diff --git a/imagecodecs/libdeflate.pxd b/imagecodecs/libdeflate.pxd index 6ad6437..f52b066 100644 --- a/imagecodecs/libdeflate.pxd +++ b/imagecodecs/libdeflate.pxd @@ -1,7 +1,7 @@ # imagecodecs/libdeflate.pxd # cython: language_level = 3 -# Cython declarations for the `libdeflate 1.18` library. +# Cython declarations for the `libdeflate 1.19` library. # https://github.com/ebiggers/libdeflate from libc.stdint cimport uint32_t @@ -18,6 +18,9 @@ cdef extern from 'libdeflate.h': struct libdeflate_decompressor: pass + struct libdeflate_options: + pass + enum libdeflate_result: LIBDEFLATE_SUCCESS LIBDEFLATE_BAD_DATA @@ -30,6 +33,11 @@ cdef extern from 'libdeflate.h': int compression_level ) nogil + libdeflate_compressor* libdeflate_alloc_compressor_ex( + int compression_level, + const libdeflate_options *options + ) nogil + size_t libdeflate_deflate_compress( libdeflate_compressor* compressor, const void* in_, @@ -77,6 +85,10 @@ cdef extern from 'libdeflate.h': libdeflate_decompressor* libdeflate_alloc_decompressor() nogil + libdeflate_decompressor* libdeflate_alloc_decompressor_ex( + const libdeflate_options *options + ) nogil + libdeflate_result libdeflate_deflate_decompress( libdeflate_decompressor* decompressor, const void* in_, @@ -158,3 +170,8 @@ cdef extern from 'libdeflate.h': void* (*malloc_func)(size_t), void (*free_func)(void*) ) nogil + + struct libdeflate_options: + size_t sizeof_options + void *(*malloc_func)(size_t) nogil + void (*free_func)(void *) nogil