VX Heaven

Library Collection Sources Engines Constructors Simulators Utilities Links Forum
[Previous] [Index] [Next]

Bill Prisoner Compression Engine

Author: Bill Prisoner

This engine uses standard static Huffman method for compression. The header of the compressed data has the following form:

Header struct
        Signature dw ?;Сигнатура. Равна "BP"
        HuffmanCodesSize dw ?;Размер таблицы кодов Хаффмана
        CompressSize dd ?;Сжатый размер данных
        DecompressSize dd ?;Распакованный размер данных
        CRC32 dd ?;Чексумма
Header ends

The engine is written with MASM 32 and should be used as follows:

;Bill Prisoner Compression Engine Include File
include ""

; compression

push dword ptr [ebp+CompressBuffer] ; pointer to buffer to hold the compressed data
push dword ptr [ebp+FileSize] ; file size
push dword ptr [ebp+hMap] ; data to compress
push dword ptr [ebp+WorkBuffer] ; temporary buffer should be at least 114592 bytes long
call bp_compress

; decompression

push dword ptr [ebp+WorkBuffer] ; temporary buffer at least 8448 bytes long
push dword ptr [ebp+CompressBuffer] ; compressed data
push dword ptr [ebp+hMap2] ; unpacked data
call bp_decompress


bpce.zip15724BPCE 1.0Dec 2005MD5 sum 3c0e82f1bf9505f3acf12ecbb607d512

By accessing, viewing, downloading or otherwise using this content you agree to be bound by the Terms of Use! aka