diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-03-30 15:36:57 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-03-30 15:36:57 (GMT) |
commit | eeb8bea34c2df279307eaed922f3a89cc420316c (patch) | |
tree | 0f0cfb841eb0579d58077c5518255f2e517e2392 /lib/lz4frame.h | |
parent | 002ec60f0feadc07a25a6f18a7b2b4ace3c1b718 (diff) | |
download | lz4-eeb8bea34c2df279307eaed922f3a89cc420316c.zip lz4-eeb8bea34c2df279307eaed922f3a89cc420316c.tar.gz lz4-eeb8bea34c2df279307eaed922f3a89cc420316c.tar.bz2 |
Updated comments on LZ4F_getFrameInfo()
Diffstat (limited to 'lib/lz4frame.h')
-rw-r--r-- | lib/lz4frame.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 01a756a..9d12c7d 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -214,8 +214,12 @@ size_t LZ4F_getFrameInfo(LZ4F_decompressionContext_t dctx, * This function decodes frame header information, such as blockSize. * It is optional : you could start by calling directly LZ4F_decompress() instead. * The objective is to extract header information without starting decompression, typically for allocation purposes. + * The function will work only if srcBuffer points at the beginning of the frame, + * and *srcSizePtr is large enough to decode the whole header (typically, between 7 & 15 bytes). + * The result is copied into an LZ4F_frameInfo_t structure, which is pointed by frameInfoPtr, and must be already allocated. * LZ4F_getFrameInfo() can also be used *after* starting decompression, on a valid LZ4F_decompressionContext_t. * The number of bytes read from srcBuffer will be provided within *srcSizePtr (necessarily <= original value). + * It is basically the frame header size. * You are expected to resume decompression from where it stopped (srcBuffer + *srcSizePtr) * The function result is an hint of how many srcSize bytes LZ4F_decompress() expects for next call, * or an error code which can be tested using LZ4F_isError(). |