antonysigma / jpegls-hdf5-filter

Fork of hdf5-jpegls-filter on Sourceforge, by D. Swanepoel & F. van den Bergh
http://dx.doi.org/10.1080/17538947.2017.1301580
MIT License
0 stars 0 forks source link

Expose the compression function for direct chunk write #11

Closed antonysigma closed 2 years ago

antonysigma commented 2 years ago

Implement the jpegls::encodeAsync function to receive a set of user-provided raw data (uint8 or uint16) of exactly one chunk in size. Partition it up to 24 subchunks, then compress and encode the subchunks to the output buffer.

Enable the function only when the c-preprocessor flag -DH5JPEGLS_USE_ASYNC is present in the compile command.

An example app direct-chunk-write.cpp is also provided to demonstrate how compression can be executed asynchronously with the H5Dwrite_chunk function.