Source Code

This package contains the following BriefLZ implementations:

  • 32-bit ANSI C [src/]
  • 32-bit x86 assembler (386+), speed-optimised [src/fast]
  • 32-bit x86 assembler (386+), size-optimised [src/small]
  • 16-bit x86 assembler (8086+) [16bit/src/]

All 32-bit x86 assembler functions preserve the ebx, esi, edi, and ebp registers across calls.

All 16-bit x86 assembler functions preserve bx, si, di, bp and the segment registers across calls.

Except for the supplied dynamic link library (dll), all functions use the C calling convention.

The assembler source code is NASM-style (I used NASM 0.98.38, but earlier versions should work fine if the cpu directive is removed). NASM is a fast, free, and portable assembler for the x86 platform, available at: http://sourceforge.net/projects/nasm/

The 32-bit NASM source code uses the NASM linker compatibility macros (nasmlcm) to facilitate compiler/linker independent code.

Makefiles (GNU Make style) for a number of compilers are included.

The compression source contains a constant, BLZ_WORKMEM_SIZE, which controls the size of the required workmem. This value can be lowered to preserve memory at the cost of compression ratio (the default value is 1 mb (32-bit) / 32 kb (16-bit)).

Pre-compiled libraries for a number of x86 compilers/linkers are included:

lib/delphi/
These are object files in OMF format, and should work with Delphi, TMT Pascal, and any other linker supporting 32-bit OMF object files.
lib/djgpp/
This library should works with DJGPP and Ada.
lib/dll/
The dynamic link library should work with any Win32 compiler/linker supporting dll usage. Unlike the other libraries, all dll functions use the stdcall calling convention.
lib/vc/
The Visual C++ library should work with Visual C++, Cygwin, MASM32, MinGW, Watcom C/C++, and any other linker supporting 32-bit MS COFF object files and libraries.
lib/watcom/
The Watcom C/C++ library should work with Watcom C/C++, Borland C/C++, Digital Mars C/C++, DOS32, TASM32, VPascal, and any other linker supporting 32-bit OMF object files and libraries.
16bit/lib/
This library should work with Borland C/C++, Digital Mars C/C++, Watcom C/C++, and any other linker supporting 16-bit OMF object files and libraries.