Wednesday, May 4, 2022

Ultra fast compression and decompression Win32 APIs for realtime applications



The NTFS file system internally uses Ultra fast Realtime data compression and decompression.
Starting with Win10, it’s used internally by OS as shown below.

The same APIs RtlCompressBuffer and RtlDecompressBuffer can be used by user applications as well.
More info in the MSDN page.

The tables below show data collected for first 10 data files during an acquisition run.
Up to 38% of savings can be achieved over a standard 1.8 MB data file. Compression timings as low as 16 milliseconds and expansion timings as low as 15 milliseconds are clocked per data file.


In an another example below,  a 5 MB DICOM image was compressed to almost 40% in 38 ms and decompressed in 8ms.

TestApp  IM_0047

Compression [fast]
uncompressed size:      5509714 compressed size:        3378829 time in ms:38

Decompression [fast]
compressed size:        3378829 uncompressed size:      5509714 time in ms:8


Compression [slow]
uncompressed size:      5509714 compressed size:        3203440 time in ms:6235

Decompression [slow]
compressed size:        3203440 uncompressed size:      5509714 time in ms:8




Source and Binaries can be found here.

No comments:

Post a Comment