Path: blob/master/dep/ffmpeg/include/libavutil/adler32.h
4216 views
/*1* copyright (c) 2006 Mans Rullgard2*3* This file is part of FFmpeg.4*5* FFmpeg is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public7* License as published by the Free Software Foundation; either8* version 2.1 of the License, or (at your option) any later version.9*10* FFmpeg is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* Lesser General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public16* License along with FFmpeg; if not, write to the Free Software17* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18*/1920/**21* @file22* @ingroup lavu_adler3223* Public header for Adler-32 hash function implementation.24*/2526#ifndef AVUTIL_ADLER32_H27#define AVUTIL_ADLER32_H2829#include <stddef.h>30#include <stdint.h>31#include "attributes.h"3233/**34* @defgroup lavu_adler32 Adler-3235* @ingroup lavu_hash36* Adler-32 hash function implementation.37*38* @{39*/4041typedef uint32_t AVAdler;4243/**44* Calculate the Adler32 checksum of a buffer.45*46* Passing the return value to a subsequent av_adler32_update() call47* allows the checksum of multiple buffers to be calculated as though48* they were concatenated.49*50* @param adler initial checksum value51* @param buf pointer to input buffer52* @param len size of input buffer53* @return updated checksum54*/55AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf,56size_t len) av_pure;5758/**59* @}60*/6162#endif /* AVUTIL_ADLER32_H */636465