Home | History | Annotate | Line # | Download | only in compress
      1  1.1  christos /*
      2  1.1  christos  * Copyright (c) Meta Platforms, Inc. and affiliates.
      3  1.1  christos  * All rights reserved.
      4  1.1  christos  *
      5  1.1  christos  * This source code is licensed under both the BSD-style license (found in the
      6  1.1  christos  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
      7  1.1  christos  * in the COPYING file in the root directory of this source tree).
      8  1.1  christos  * You may select, at your option, one of the above-listed licenses.
      9  1.1  christos  */
     10  1.1  christos 
     11  1.1  christos #ifndef ZSTD_PRESPLIT_H
     12  1.1  christos #define ZSTD_PRESPLIT_H
     13  1.1  christos 
     14  1.1  christos #include <stddef.h>  /* size_t */
     15  1.1  christos 
     16  1.1  christos #define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208
     17  1.1  christos 
     18  1.1  christos /* ZSTD_splitBlock():
     19  1.1  christos  * @level must be a value between 0 and 4.
     20  1.1  christos  *        higher levels spend more energy to detect block boundaries.
     21  1.1  christos  * @workspace must be aligned for size_t.
     22  1.1  christos  * @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE
     23  1.1  christos  * note:
     24  1.1  christos  * For the time being, this function only accepts full 128 KB blocks.
     25  1.1  christos  * Therefore, @blockSize must be == 128 KB.
     26  1.1  christos  * While this could be extended to smaller sizes in the future,
     27  1.1  christos  * it is not yet clear if this would be useful. TBD.
     28  1.1  christos  */
     29  1.1  christos size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize,
     30  1.1  christos                     int level,
     31  1.1  christos                     void* workspace, size_t wkspSize);
     32  1.1  christos 
     33  1.1  christos #endif /* ZSTD_PRESPLIT_H */
     34