News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Test of undocumented NTDLL compression functions

Started by MichaelW, May 13, 2006, 10:42:12 PM

Previous topic - Next topic

MichaelW

The attachment contains a quick and dirty test of the undocumented NTDLL buffer compression functions. I did not attempt to compare the compression (or decompression) speeds to other compression algorithms, but the general consensus seems to be that the NTDLL standard compression engine is very fast. The maximum compression engine is generally able to improve on the compression ratio of the standard engine by a few percent, but for sizeable files it is very slow. The last test is a special case where the NTDLL functions are used to compress and then decompress a zip archive containing a file that consists of the character "x" repeated 10000000 times. The zip algorithm compressed the file to 9719 bytes, for a total zip file size of 9835 bytes, and the NTDLL compression function was able to compress the zip file down to 514 bytes.



[attachment deleted by admin]
eschew obfuscation

hutch--

Michael,

I ran the test on my local machine and it works fine and all of the results seem to be correct. It looks like ther compression algo is a bit smarter than ZIP which is a very old format in that it appears to perform some style of RLE prior to its main algo type which I am guessing is an LZ style of compression algo.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

asmfan

As i remember the first attempt of MS to use compression/decompression was with CAB files (cabinet), then i found a Heap compression function... and now this. But why it is undocumented? Is there something to hide/undocument:)? Or maybe it is alpha(beta) version of these compress functios:)
Russia is a weird place

MichaelW

I suspect that these functions evolved from the DriveSpace disk compression functions, where speed was more important than compression ratio. In my tests these functions always produced a compression ratio that was well below the compression ratio for a ZIP file containing the same data. For the CAB files that I have tested, the compression ratio was always slightly higher than the compression ratio for a ZIP file containing the same data.

Back in the DOS era I think Microsoft's official justification for undocumented functions was that documenting a function obligated them to continue supporting it, and hindered their ability to improve it.

eschew obfuscation

zcoder

I think it is for the folder veiws, and making zip files in windows
and was not for programmers to use.

Zcoder....
Back in 1979, My computer ran so fine.
And there was no such thing,
As a Microsoft Crashed Machine.
http://zcoder.110mb.com
http://www.dietzel.com/partner/idevaffiliate.php?id=345_6  Free Domain Names

PBrennick

I think zcoder has the right of it here, in fact, I am sure of it.  This was just the exact type of thing that MS loved to do.

Paul
The GeneSys Project is available from:
The Repository or My crappy website