extlz4 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +22 -0
- data/contrib/lz4/LICENSE +2 -1
- data/contrib/lz4/Makefile.inc +39 -15
- data/contrib/lz4/NEWS +21 -0
- data/contrib/lz4/README.md +1 -1
- data/contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.rc +1 -1
- data/contrib/lz4/build/VS2010/lz4/lz4.rc +1 -1
- data/contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.rc +1 -1
- data/contrib/lz4/build/VS2017/lz4/lz4.rc +1 -1
- data/contrib/lz4/build/VS2017/lz4/lz4.vcxproj +12 -1
- data/contrib/lz4/build/VS2022/datagen/datagen.vcxproj +173 -0
- data/contrib/lz4/build/VS2022/frametest/frametest.vcxproj +180 -0
- data/contrib/lz4/build/VS2022/fullbench/fullbench.vcxproj +180 -0
- data/contrib/lz4/build/VS2022/fullbench-dll/fullbench-dll.vcxproj +184 -0
- data/contrib/lz4/build/VS2022/fuzzer/fuzzer.vcxproj +177 -0
- data/contrib/lz4/build/VS2022/liblz4/liblz4.vcxproj +179 -0
- data/contrib/lz4/build/VS2022/liblz4-dll/liblz4-dll.rc +51 -0
- data/contrib/lz4/build/VS2022/liblz4-dll/liblz4-dll.vcxproj +183 -0
- data/contrib/lz4/build/VS2022/lz4.sln +103 -0
- data/contrib/lz4/build/cmake/CMakeLists.txt +49 -11
- data/contrib/lz4/build/cmake/lz4Config.cmake.in +2 -0
- data/contrib/lz4/lib/LICENSE +1 -1
- data/contrib/lz4/lib/README.md +45 -13
- data/contrib/lz4/lib/liblz4-dll.rc.in +1 -1
- data/contrib/lz4/lib/liblz4.pc.in +3 -3
- data/contrib/lz4/lib/lz4.c +422 -195
- data/contrib/lz4/lib/lz4.h +114 -46
- data/contrib/lz4/lib/lz4file.c +311 -0
- data/contrib/lz4/lib/lz4file.h +93 -0
- data/contrib/lz4/lib/lz4frame.c +421 -242
- data/contrib/lz4/lib/lz4frame.h +122 -53
- data/contrib/lz4/lib/lz4frame_static.h +1 -1
- data/contrib/lz4/lib/lz4hc.c +127 -111
- data/contrib/lz4/lib/lz4hc.h +14 -14
- data/contrib/lz4/ossfuzz/Makefile +1 -0
- data/contrib/lz4/ossfuzz/decompress_fuzzer.c +18 -2
- data/contrib/lz4/ossfuzz/fuzz_helpers.h +3 -2
- data/contrib/lz4/ossfuzz/round_trip_frame_uncompressed_fuzzer.c +134 -0
- data/contrib/lz4/ossfuzz/round_trip_fuzzer.c +66 -6
- data/ext/blockapi.c +8 -8
- data/ext/extlz4.h +12 -0
- data/ext/frameapi.c +3 -3
- data/ext/hashargs.c +7 -1
- metadata +16 -5
- data/contrib/lz4/tmp +0 -0
- data/contrib/lz4/tmpsparse +0 -0
    
        data/contrib/lz4/lib/lz4frame.h
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            /*
         | 
| 2 | 
            -
                | 
| 2 | 
            +
               LZ4F - LZ4-Frame library
         | 
| 3 3 | 
             
               Header File
         | 
| 4 | 
            -
               Copyright (C) 2011- | 
| 4 | 
            +
               Copyright (C) 2011-2020, Yann Collet.
         | 
| 5 5 | 
             
               BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
         | 
| 6 6 |  | 
| 7 7 | 
             
               Redistribution and use in source and binary forms, with or without
         | 
| @@ -39,7 +39,7 @@ | |
| 39 39 | 
             
             * LZ4F also offers streaming capabilities.
         | 
| 40 40 | 
             
             *
         | 
| 41 41 | 
             
             * lz4.h is not required when using lz4frame.h,
         | 
| 42 | 
            -
             * except to extract common  | 
| 42 | 
            +
             * except to extract common constants such as LZ4_VERSION_NUMBER.
         | 
| 43 43 | 
             
             * */
         | 
| 44 44 |  | 
| 45 45 | 
             
            #ifndef LZ4F_H_09782039843
         | 
| @@ -54,12 +54,12 @@ extern "C" { | |
| 54 54 |  | 
| 55 55 |  | 
| 56 56 | 
             
            /**
         | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 57 | 
            +
             * Introduction
         | 
| 58 | 
            +
             *
         | 
| 59 | 
            +
             * lz4frame.h implements LZ4 frame specification: see doc/lz4_Frame_format.md .
         | 
| 60 | 
            +
             * LZ4 Frames are compatible with `lz4` CLI,
         | 
| 61 | 
            +
             * and designed to be interoperable with any system.
         | 
| 62 | 
            +
            **/
         | 
| 63 63 |  | 
| 64 64 | 
             
            /*-***************************************************************
         | 
| 65 65 | 
             
             *  Compiler specifics
         | 
| @@ -210,7 +210,7 @@ LZ4FLIB_API int LZ4F_compressionLevel_max(void);   /* v1.8.0+ */ | |
| 210 210 | 
             
             *  Returns the maximum possible compressed size with LZ4F_compressFrame() given srcSize and preferences.
         | 
| 211 211 | 
             
             * `preferencesPtr` is optional. It can be replaced by NULL, in which case, the function will assume default preferences.
         | 
| 212 212 | 
             
             *  Note : this result is only usable with LZ4F_compressFrame().
         | 
| 213 | 
            -
             *         It may also be  | 
| 213 | 
            +
             *         It may also be relevant to LZ4F_compressUpdate() _only if_ no flush() operation is ever performed.
         | 
| 214 214 | 
             
             */
         | 
| 215 215 | 
             
            LZ4FLIB_API size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr);
         | 
| 216 216 |  | 
| @@ -230,7 +230,7 @@ LZ4FLIB_API size_t LZ4F_compressFrame(void* dstBuffer, size_t dstCapacity, | |
| 230 230 | 
             
            *  Advanced compression functions
         | 
| 231 231 | 
             
            *************************************/
         | 
| 232 232 | 
             
            typedef struct LZ4F_cctx_s LZ4F_cctx;   /* incomplete type */
         | 
| 233 | 
            -
            typedef LZ4F_cctx* LZ4F_compressionContext_t; | 
| 233 | 
            +
            typedef LZ4F_cctx* LZ4F_compressionContext_t;  /* for compatibility with older APIs, prefer using LZ4F_cctx */
         | 
| 234 234 |  | 
| 235 235 | 
             
            typedef struct {
         | 
| 236 236 | 
             
              unsigned stableSrc;    /* 1 == src content will remain present on future calls to LZ4F_compress(); skip copying src content within tmp buffer */
         | 
| @@ -243,20 +243,27 @@ typedef struct { | |
| 243 243 | 
             
            LZ4FLIB_API unsigned LZ4F_getVersion(void);
         | 
| 244 244 |  | 
| 245 245 | 
             
            /*! LZ4F_createCompressionContext() :
         | 
| 246 | 
            -
             * | 
| 247 | 
            -
             *  | 
| 248 | 
            -
             *  | 
| 249 | 
            -
             *  | 
| 250 | 
            -
             *  | 
| 251 | 
            -
             *  | 
| 252 | 
            -
              | 
| 246 | 
            +
             *  The first thing to do is to create a compressionContext object,
         | 
| 247 | 
            +
             *  which will keep track of operation state during streaming compression.
         | 
| 248 | 
            +
             *  This is achieved using LZ4F_createCompressionContext(), which takes as argument a version,
         | 
| 249 | 
            +
             *  and a pointer to LZ4F_cctx*, to write the resulting pointer into.
         | 
| 250 | 
            +
             *  @version provided MUST be LZ4F_VERSION. It is intended to track potential version mismatch, notably when using DLL.
         | 
| 251 | 
            +
             *  The function provides a pointer to a fully allocated LZ4F_cctx object.
         | 
| 252 | 
            +
             *  @cctxPtr MUST be != NULL.
         | 
| 253 | 
            +
             *  If @return != zero, context creation failed.
         | 
| 254 | 
            +
             *  A created compression context can be employed multiple times for consecutive streaming operations.
         | 
| 255 | 
            +
             *  Once all streaming compression jobs are completed,
         | 
| 256 | 
            +
             *  the state object can be released using LZ4F_freeCompressionContext().
         | 
| 257 | 
            +
             *  Note1 : LZ4F_freeCompressionContext() is always successful. Its return value can be ignored.
         | 
| 258 | 
            +
             *  Note2 : LZ4F_freeCompressionContext() works fine with NULL input pointers (do nothing).
         | 
| 259 | 
            +
            **/
         | 
| 253 260 | 
             
            LZ4FLIB_API LZ4F_errorCode_t LZ4F_createCompressionContext(LZ4F_cctx** cctxPtr, unsigned version);
         | 
| 254 261 | 
             
            LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx);
         | 
| 255 262 |  | 
| 256 263 |  | 
| 257 264 | 
             
            /*----    Compression    ----*/
         | 
| 258 265 |  | 
| 259 | 
            -
            #define LZ4F_HEADER_SIZE_MIN  7   /* LZ4 Frame header size can vary, depending on selected  | 
| 266 | 
            +
            #define LZ4F_HEADER_SIZE_MIN  7   /* LZ4 Frame header size can vary, depending on selected parameters */
         | 
| 260 267 | 
             
            #define LZ4F_HEADER_SIZE_MAX 19
         | 
| 261 268 |  | 
| 262 269 | 
             
            /* Size in bytes of a block header in little-endian format. Highest bit indicates if block data is uncompressed */
         | 
| @@ -301,8 +308,9 @@ LZ4FLIB_API size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* | |
| 301 308 | 
             
             *  Important rule: dstCapacity MUST be large enough to ensure operation success even in worst case situations.
         | 
| 302 309 | 
             
             *  This value is provided by LZ4F_compressBound().
         | 
| 303 310 | 
             
             *  If this condition is not respected, LZ4F_compress() will fail (result is an errorCode).
         | 
| 304 | 
            -
             *   | 
| 305 | 
            -
             *   | 
| 311 | 
            +
             *  After an error, the state is left in a UB state, and must be re-initialized or freed.
         | 
| 312 | 
            +
             *  If previously an uncompressed block was written, buffered data is flushed
         | 
| 313 | 
            +
             *  before appending compressed data is continued.
         | 
| 306 314 | 
             
             * `cOptPtr` is optional : NULL can be provided, in which case all options are set to default.
         | 
| 307 315 | 
             
             * @return : number of bytes written into `dstBuffer` (it can be zero, meaning input data was just buffered).
         | 
| 308 316 | 
             
             *           or an error code if it fails (which can be tested using LZ4F_isError())
         | 
| @@ -347,8 +355,12 @@ typedef struct LZ4F_dctx_s LZ4F_dctx;   /* incomplete type */ | |
| 347 355 | 
             
            typedef LZ4F_dctx* LZ4F_decompressionContext_t;   /* compatibility with previous API versions */
         | 
| 348 356 |  | 
| 349 357 | 
             
            typedef struct {
         | 
| 350 | 
            -
              unsigned stableDst; | 
| 351 | 
            -
             | 
| 358 | 
            +
              unsigned stableDst;     /* pledges that last 64KB decompressed data will remain available unmodified between invocations.
         | 
| 359 | 
            +
                                       * This optimization skips storage operations in tmp buffers. */
         | 
| 360 | 
            +
              unsigned skipChecksums; /* disable checksum calculation and verification, even when one is present in frame, to save CPU time.
         | 
| 361 | 
            +
                                       * Setting this option to 1 once disables all checksums for the rest of the frame. */
         | 
| 362 | 
            +
              unsigned reserved1;     /* must be set to zero for forward compatibility */
         | 
| 363 | 
            +
              unsigned reserved0;     /* idem */
         | 
| 352 364 | 
             
            } LZ4F_decompressOptions_t;
         | 
| 353 365 |  | 
| 354 366 |  | 
| @@ -356,9 +368,10 @@ typedef struct { | |
| 356 368 |  | 
| 357 369 | 
             
            /*! LZ4F_createDecompressionContext() :
         | 
| 358 370 | 
             
             *  Create an LZ4F_dctx object, to track all decompression operations.
         | 
| 359 | 
            -
             *   | 
| 360 | 
            -
             *   | 
| 361 | 
            -
             *  The  | 
| 371 | 
            +
             *  @version provided MUST be LZ4F_VERSION.
         | 
| 372 | 
            +
             *  @dctxPtr MUST be valid.
         | 
| 373 | 
            +
             *  The function fills @dctxPtr with the value of a pointer to an allocated and initialized LZ4F_dctx object.
         | 
| 374 | 
            +
             *  The @return is an errorCode, which can be tested using LZ4F_isError().
         | 
| 362 375 | 
             
             *  dctx memory can be released using LZ4F_freeDecompressionContext();
         | 
| 363 376 | 
             
             *  Result of LZ4F_freeDecompressionContext() indicates current state of decompressionContext when being released.
         | 
| 364 377 | 
             
             *  That is, it should be == 0 if decompression has been completed fully and correctly.
         | 
| @@ -371,6 +384,8 @@ LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx); | |
| 371 384 | 
             
            *  Streaming decompression functions
         | 
| 372 385 | 
             
            *************************************/
         | 
| 373 386 |  | 
| 387 | 
            +
            #define LZ4F_MAGICNUMBER 0x184D2204U
         | 
| 388 | 
            +
            #define LZ4F_MAGIC_SKIPPABLE_START 0x184D2A50U
         | 
| 374 389 | 
             
            #define LZ4F_MIN_SIZE_TO_KNOW_HEADER_LENGTH 5
         | 
| 375 390 |  | 
| 376 391 | 
             
            /*! LZ4F_headerSize() : v1.9.0+
         | 
| @@ -386,7 +401,7 @@ LZ4FLIB_API size_t LZ4F_headerSize(const void* src, size_t srcSize); | |
| 386 401 |  | 
| 387 402 | 
             
            /*! LZ4F_getFrameInfo() :
         | 
| 388 403 | 
             
             *  This function extracts frame parameters (max blockSize, dictID, etc.).
         | 
| 389 | 
            -
             *  Its usage is optional: user can  | 
| 404 | 
            +
             *  Its usage is optional: user can also invoke LZ4F_decompress() directly.
         | 
| 390 405 | 
             
             *
         | 
| 391 406 | 
             
             *  Extracted information will fill an existing LZ4F_frameInfo_t structure.
         | 
| 392 407 | 
             
             *  This can be useful for allocation and dictionary identification purposes.
         | 
| @@ -427,9 +442,10 @@ LZ4FLIB_API size_t LZ4F_headerSize(const void* src, size_t srcSize); | |
| 427 442 | 
             
             *  note 1 : in case of error, dctx is not modified. Decoding operation can resume from beginning safely.
         | 
| 428 443 | 
             
             *  note 2 : frame parameters are *copied into* an already allocated LZ4F_frameInfo_t structure.
         | 
| 429 444 | 
             
             */
         | 
| 430 | 
            -
            LZ4FLIB_API size_t | 
| 431 | 
            -
             | 
| 432 | 
            -
             | 
| 445 | 
            +
            LZ4FLIB_API size_t
         | 
| 446 | 
            +
            LZ4F_getFrameInfo(LZ4F_dctx* dctx,
         | 
| 447 | 
            +
                              LZ4F_frameInfo_t* frameInfoPtr,
         | 
| 448 | 
            +
                        const void* srcBuffer, size_t* srcSizePtr);
         | 
| 433 449 |  | 
| 434 450 | 
             
            /*! LZ4F_decompress() :
         | 
| 435 451 | 
             
             *  Call this function repetitively to regenerate data compressed in `srcBuffer`.
         | 
| @@ -462,10 +478,11 @@ LZ4FLIB_API size_t LZ4F_getFrameInfo(LZ4F_dctx* dctx, | |
| 462 478 | 
             
             *
         | 
| 463 479 | 
             
             *  After a frame is fully decoded, dctx can be used again to decompress another frame.
         | 
| 464 480 | 
             
             */
         | 
| 465 | 
            -
            LZ4FLIB_API size_t | 
| 466 | 
            -
             | 
| 467 | 
            -
             | 
| 468 | 
            -
             | 
| 481 | 
            +
            LZ4FLIB_API size_t
         | 
| 482 | 
            +
            LZ4F_decompress(LZ4F_dctx* dctx,
         | 
| 483 | 
            +
                            void* dstBuffer, size_t* dstSizePtr,
         | 
| 484 | 
            +
                      const void* srcBuffer, size_t* srcSizePtr,
         | 
| 485 | 
            +
                      const LZ4F_decompressOptions_t* dOptPtr);
         | 
| 469 486 |  | 
| 470 487 |  | 
| 471 488 | 
             
            /*! LZ4F_resetDecompressionContext() : added in v1.8.0
         | 
| @@ -529,6 +546,8 @@ extern "C" { | |
| 529 546 | 
             
                    ITEM(ERROR_headerChecksum_invalid) \
         | 
| 530 547 | 
             
                    ITEM(ERROR_contentChecksum_invalid) \
         | 
| 531 548 | 
             
                    ITEM(ERROR_frameDecoding_alreadyStarted) \
         | 
| 549 | 
            +
                    ITEM(ERROR_compressionState_uninitialized) \
         | 
| 550 | 
            +
                    ITEM(ERROR_parameter_null) \
         | 
| 532 551 | 
             
                    ITEM(ERROR_maxCode)
         | 
| 533 552 |  | 
| 534 553 | 
             
            #define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM,
         | 
| @@ -539,7 +558,31 @@ typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM) | |
| 539 558 |  | 
| 540 559 | 
             
            LZ4FLIB_STATIC_API LZ4F_errorCodes LZ4F_getErrorCode(size_t functionResult);
         | 
| 541 560 |  | 
| 542 | 
            -
             | 
| 561 | 
            +
             | 
| 562 | 
            +
            /*! LZ4F_getBlockSize() :
         | 
| 563 | 
            +
             *  Return, in scalar format (size_t),
         | 
| 564 | 
            +
             *  the maximum block size associated with blockSizeID.
         | 
| 565 | 
            +
            **/
         | 
| 566 | 
            +
            LZ4FLIB_STATIC_API size_t LZ4F_getBlockSize(LZ4F_blockSizeID_t blockSizeID);
         | 
| 567 | 
            +
             | 
| 568 | 
            +
            /*! LZ4F_uncompressedUpdate() :
         | 
| 569 | 
            +
             *  LZ4F_uncompressedUpdate() can be called repetitively to add as much data uncompressed data as necessary.
         | 
| 570 | 
            +
             *  Important rule: dstCapacity MUST be large enough to store the entire source buffer as
         | 
| 571 | 
            +
             *  no compression is done for this operation
         | 
| 572 | 
            +
             *  If this condition is not respected, LZ4F_uncompressedUpdate() will fail (result is an errorCode).
         | 
| 573 | 
            +
             *  After an error, the state is left in a UB state, and must be re-initialized or freed.
         | 
| 574 | 
            +
             *  If previously a compressed block was written, buffered data is flushed
         | 
| 575 | 
            +
             *  before appending uncompressed data is continued.
         | 
| 576 | 
            +
             *  This is only supported when LZ4F_blockIndependent is used
         | 
| 577 | 
            +
             * `cOptPtr` is optional : NULL can be provided, in which case all options are set to default.
         | 
| 578 | 
            +
             * @return : number of bytes written into `dstBuffer` (it can be zero, meaning input data was just buffered).
         | 
| 579 | 
            +
             *           or an error code if it fails (which can be tested using LZ4F_isError())
         | 
| 580 | 
            +
             */
         | 
| 581 | 
            +
            LZ4FLIB_STATIC_API size_t
         | 
| 582 | 
            +
            LZ4F_uncompressedUpdate(LZ4F_cctx* cctx,
         | 
| 583 | 
            +
                                    void* dstBuffer, size_t dstCapacity,
         | 
| 584 | 
            +
                              const void* srcBuffer, size_t srcSize,
         | 
| 585 | 
            +
                              const LZ4F_compressOptions_t* cOptPtr);
         | 
| 543 586 |  | 
| 544 587 | 
             
            /**********************************
         | 
| 545 588 | 
             
             *  Bulk processing dictionary API
         | 
| @@ -583,12 +626,12 @@ LZ4FLIB_STATIC_API void        LZ4F_freeCDict(LZ4F_CDict* CDict); | |
| 583 626 | 
             
             *  but it's not recommended, as it's the only way to provide dictID in the frame header.
         | 
| 584 627 | 
             
             * @return : number of bytes written into dstBuffer.
         | 
| 585 628 | 
             
             *           or an error code if it fails (can be tested using LZ4F_isError()) */
         | 
| 586 | 
            -
            LZ4FLIB_STATIC_API size_t | 
| 587 | 
            -
             | 
| 588 | 
            -
             | 
| 589 | 
            -
             | 
| 590 | 
            -
             | 
| 591 | 
            -
             | 
| 629 | 
            +
            LZ4FLIB_STATIC_API size_t
         | 
| 630 | 
            +
            LZ4F_compressFrame_usingCDict(LZ4F_cctx* cctx,
         | 
| 631 | 
            +
                                          void* dst, size_t dstCapacity,
         | 
| 632 | 
            +
                                    const void* src, size_t srcSize,
         | 
| 633 | 
            +
                                    const LZ4F_CDict* cdict,
         | 
| 634 | 
            +
                                    const LZ4F_preferences_t* preferencesPtr);
         | 
| 592 635 |  | 
| 593 636 |  | 
| 594 637 | 
             
            /*! LZ4F_compressBegin_usingCDict() :
         | 
| @@ -598,23 +641,49 @@ LZ4FLIB_STATIC_API size_t LZ4F_compressFrame_usingCDict( | |
| 598 641 | 
             
             *  however, it's the only way to provide dictID in the frame header.
         | 
| 599 642 | 
             
             * @return : number of bytes written into dstBuffer for the header,
         | 
| 600 643 | 
             
             *           or an error code (which can be tested using LZ4F_isError()) */
         | 
| 601 | 
            -
            LZ4FLIB_STATIC_API size_t | 
| 602 | 
            -
             | 
| 603 | 
            -
             | 
| 604 | 
            -
             | 
| 605 | 
            -
             | 
| 644 | 
            +
            LZ4FLIB_STATIC_API size_t
         | 
| 645 | 
            +
            LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctx,
         | 
| 646 | 
            +
                                          void* dstBuffer, size_t dstCapacity,
         | 
| 647 | 
            +
                                    const LZ4F_CDict* cdict,
         | 
| 648 | 
            +
                                    const LZ4F_preferences_t* prefsPtr);
         | 
| 606 649 |  | 
| 607 650 |  | 
| 608 651 | 
             
            /*! LZ4F_decompress_usingDict() :
         | 
| 609 652 | 
             
             *  Same as LZ4F_decompress(), using a predefined dictionary.
         | 
| 610 653 | 
             
             *  Dictionary is used "in place", without any preprocessing.
         | 
| 611 | 
            -
             | 
| 612 | 
            -
            LZ4FLIB_STATIC_API size_t | 
| 613 | 
            -
             | 
| 614 | 
            -
             | 
| 615 | 
            -
             | 
| 616 | 
            -
             | 
| 617 | 
            -
             | 
| 654 | 
            +
            **  It must remain accessible throughout the entire frame decoding. */
         | 
| 655 | 
            +
            LZ4FLIB_STATIC_API size_t
         | 
| 656 | 
            +
            LZ4F_decompress_usingDict(LZ4F_dctx* dctxPtr,
         | 
| 657 | 
            +
                                      void* dstBuffer, size_t* dstSizePtr,
         | 
| 658 | 
            +
                                const void* srcBuffer, size_t* srcSizePtr,
         | 
| 659 | 
            +
                                const void* dict, size_t dictSize,
         | 
| 660 | 
            +
                                const LZ4F_decompressOptions_t* decompressOptionsPtr);
         | 
| 661 | 
            +
             | 
| 662 | 
            +
             | 
| 663 | 
            +
            /*! Custom memory allocation :
         | 
| 664 | 
            +
             *  These prototypes make it possible to pass custom allocation/free functions.
         | 
| 665 | 
            +
             *  LZ4F_customMem is provided at state creation time, using LZ4F_create*_advanced() listed below.
         | 
| 666 | 
            +
             *  All allocation/free operations will be completed using these custom variants instead of regular <stdlib.h> ones.
         | 
| 667 | 
            +
             */
         | 
| 668 | 
            +
            typedef void* (*LZ4F_AllocFunction) (void* opaqueState, size_t size);
         | 
| 669 | 
            +
            typedef void* (*LZ4F_CallocFunction) (void* opaqueState, size_t size);
         | 
| 670 | 
            +
            typedef void  (*LZ4F_FreeFunction) (void* opaqueState, void* address);
         | 
| 671 | 
            +
            typedef struct {
         | 
| 672 | 
            +
                LZ4F_AllocFunction customAlloc;
         | 
| 673 | 
            +
                LZ4F_CallocFunction customCalloc; /* optional; when not defined, uses customAlloc + memset */
         | 
| 674 | 
            +
                LZ4F_FreeFunction customFree;
         | 
| 675 | 
            +
                void* opaqueState;
         | 
| 676 | 
            +
            } LZ4F_CustomMem;
         | 
| 677 | 
            +
            static
         | 
| 678 | 
            +
            #ifdef __GNUC__
         | 
| 679 | 
            +
            __attribute__((__unused__))
         | 
| 680 | 
            +
            #endif
         | 
| 681 | 
            +
            LZ4F_CustomMem const LZ4F_defaultCMem = { NULL, NULL, NULL, NULL };  /**< this constant defers to stdlib's functions */
         | 
| 682 | 
            +
             | 
| 683 | 
            +
            LZ4FLIB_STATIC_API LZ4F_cctx* LZ4F_createCompressionContext_advanced(LZ4F_CustomMem customMem, unsigned version);
         | 
| 684 | 
            +
            LZ4FLIB_STATIC_API LZ4F_dctx* LZ4F_createDecompressionContext_advanced(LZ4F_CustomMem customMem, unsigned version);
         | 
| 685 | 
            +
            LZ4FLIB_STATIC_API LZ4F_CDict* LZ4F_createCDict_advanced(LZ4F_CustomMem customMem, const void* dictBuffer, size_t dictSize);
         | 
| 686 | 
            +
             | 
| 618 687 |  | 
| 619 688 | 
             
            #if defined (__cplusplus)
         | 
| 620 689 | 
             
            }
         |