mirror of
https://github.com/aaru-dps/Aaru.Compression.Native.git
synced 2025-12-16 19:24:31 +00:00
Implement LZD from ZOO (method 1), heavily modified to support .NET straming mechanisms.
This commit is contained in:
129
library.h
129
library.h
@@ -54,55 +54,112 @@
|
||||
#define FORCE_INLINE static inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_adc_decode_buffer(uint8_t *dst_buffer, int32_t dst_size, const uint8_t *src_buffer,
|
||||
int32_t src_size);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_adc_decode_buffer(uint8_t * dst_buffer,
|
||||
int32_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
int32_t src_size);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_apple_rle_decode_buffer(uint8_t *dst_buffer, int32_t dst_size,
|
||||
const uint8_t *src_buffer, int32_t src_size);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_apple_rle_decode_buffer(uint8_t * dst_buffer,
|
||||
int32_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
int32_t src_size);
|
||||
|
||||
AARU_EXPORT size_t AARU_CALL AARU_flac_decode_redbook_buffer(uint8_t *dst_buffer, size_t dst_size,
|
||||
const uint8_t *src_buffer, size_t src_size);
|
||||
AARU_EXPORT size_t AARU_CALL AARU_flac_decode_redbook_buffer(uint8_t * dst_buffer,
|
||||
size_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
size_t src_size);
|
||||
|
||||
AARU_EXPORT size_t AARU_CALL AARU_flac_encode_redbook_buffer(
|
||||
uint8_t *dst_buffer, size_t dst_size, const uint8_t *src_buffer, size_t src_size, uint32_t blocksize,
|
||||
int32_t do_mid_side_stereo, int32_t loose_mid_side_stereo, const char *apodization, uint32_t max_lpc_order,
|
||||
uint32_t qlp_coeff_precision, int32_t do_qlp_coeff_prec_search, int32_t do_exhaustive_model_search,
|
||||
uint32_t min_residual_partition_order, uint32_t max_residual_partition_order, const char *application_id,
|
||||
uint32_t application_id_len);
|
||||
AARU_EXPORT size_t AARU_CALL AARU_flac_encode_redbook_buffer(uint8_t * dst_buffer,
|
||||
size_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
size_t src_size,
|
||||
uint32_t blocksize,
|
||||
int32_t do_mid_side_stereo,
|
||||
int32_t loose_mid_side_stereo,
|
||||
const char * apodization,
|
||||
uint32_t max_lpc_order,
|
||||
uint32_t qlp_coeff_precision,
|
||||
int32_t do_qlp_coeff_prec_search,
|
||||
int32_t do_exhaustive_model_search,
|
||||
uint32_t min_residual_partition_order,
|
||||
uint32_t max_residual_partition_order,
|
||||
const char * application_id,
|
||||
uint32_t application_id_len);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzip_decode_buffer(uint8_t *dst_buffer, int32_t dst_size, const uint8_t *src_buffer,
|
||||
int32_t src_size);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzip_decode_buffer(uint8_t * dst_buffer,
|
||||
int32_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
int32_t src_size);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzip_encode_buffer(uint8_t *dst_buffer, int32_t dst_size, const uint8_t *src_buffer,
|
||||
int32_t src_size, int32_t dictionary_size,
|
||||
int32_t match_len_limit);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzip_encode_buffer(uint8_t * dst_buffer,
|
||||
int32_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
int32_t src_size,
|
||||
int32_t dictionary_size,
|
||||
int32_t match_len_limit);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_bzip2_decode_buffer(uint8_t *dst_buffer, uint32_t *dst_size,
|
||||
const uint8_t *src_buffer, uint32_t src_size);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_bzip2_decode_buffer(uint8_t * dst_buffer,
|
||||
uint32_t * dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
uint32_t src_size);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_bzip2_encode_buffer(uint8_t *dst_buffer, uint32_t *dst_size,
|
||||
const uint8_t *src_buffer, uint32_t src_size,
|
||||
int32_t blockSize100k);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_bzip2_encode_buffer(uint8_t * dst_buffer,
|
||||
uint32_t * dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
uint32_t src_size,
|
||||
int32_t blockSize100k);
|
||||
|
||||
AARU_EXPORT size_t AARU_CALL AARU_lzfse_decode_buffer(uint8_t *dst_buffer, size_t dst_size, const uint8_t *src_buffer,
|
||||
size_t src_size, void *scratch_buffer);
|
||||
AARU_EXPORT size_t AARU_CALL AARU_lzfse_decode_buffer(uint8_t * dst_buffer,
|
||||
size_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
size_t src_size,
|
||||
void * scratch_buffer);
|
||||
|
||||
AARU_EXPORT size_t AARU_CALL AARU_lzfse_encode_buffer(uint8_t *dst_buffer, size_t dst_size, const uint8_t *src_buffer,
|
||||
size_t src_size, void *scratch_buffer);
|
||||
AARU_EXPORT size_t AARU_CALL AARU_lzfse_encode_buffer(uint8_t * dst_buffer,
|
||||
size_t dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
size_t src_size,
|
||||
void * scratch_buffer);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzma_decode_buffer(uint8_t *dst_buffer, size_t *dst_size, const uint8_t *src_buffer,
|
||||
size_t *src_size, const uint8_t *props, size_t propsSize);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzma_decode_buffer(uint8_t * dst_buffer,
|
||||
size_t * dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
size_t * src_size,
|
||||
const uint8_t *props,
|
||||
size_t propsSize);
|
||||
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzma_encode_buffer(uint8_t *dst_buffer, size_t *dst_size, const uint8_t *src_buffer,
|
||||
size_t src_size, uint8_t *outProps, size_t *outPropsSize,
|
||||
int32_t level, uint32_t dictSize, int32_t lc, int32_t lp,
|
||||
int32_t pb, int32_t fb, int32_t numThreads);
|
||||
AARU_EXPORT int32_t AARU_CALL AARU_lzma_encode_buffer(uint8_t * dst_buffer,
|
||||
size_t * dst_size,
|
||||
const uint8_t *src_buffer,
|
||||
size_t src_size,
|
||||
uint8_t * outProps,
|
||||
size_t * outPropsSize,
|
||||
int32_t level,
|
||||
uint32_t dictSize,
|
||||
int32_t lc,
|
||||
int32_t lp,
|
||||
int32_t pb,
|
||||
int32_t fb,
|
||||
int32_t numThreads);
|
||||
|
||||
AARU_EXPORT size_t AARU_CALL AARU_zstd_decode_buffer(void *dst_buffer, size_t dst_size, const void *src_buffer,
|
||||
size_t src_size);
|
||||
AARU_EXPORT size_t AARU_CALL AARU_zstd_decode_buffer(void * dst_buffer,
|
||||
size_t dst_size,
|
||||
const void *src_buffer,
|
||||
size_t src_size);
|
||||
|
||||
AARU_EXPORT size_t AARU_CALL AARU_zstd_encode_buffer(void *dst_buffer, size_t dst_size, const void *src_buffer,
|
||||
size_t src_size, int32_t compressionLevel);
|
||||
AARU_EXPORT size_t AARU_CALL AARU_zstd_encode_buffer(void * dst_buffer,
|
||||
size_t dst_size,
|
||||
const void *src_buffer,
|
||||
size_t src_size,
|
||||
int32_t compressionLevel);
|
||||
|
||||
AARU_EXPORT void * AARU_CALL CreateLZDContext(void);
|
||||
|
||||
AARU_EXPORT void AARU_CALL DestroyLZDContext(void *ctx);
|
||||
|
||||
AARU_EXPORT int AARU_CALL LZD_FeedNative(void *ctx, const unsigned char *data, size_t length);
|
||||
|
||||
AARU_EXPORT int AARU_CALL LZD_DrainNative(void *ctx, unsigned char *outBuf, size_t outBufLen, size_t *produced);
|
||||
|
||||
#define AARU_CHECKUMS_NATIVE_VERSION 0x06000089
|
||||
|
||||
|
||||
Reference in New Issue
Block a user