aPLib is a lightweight, fast, and efficient compression library based on the LZ77 algorithm. It is written in assembly language and optimized for speed.
- LZ77-based compression: Provides good compression ratios for a wide range of data.
- Fast: The core compression and decompression routines are written in highly optimized assembly language.
- Lightweight: The library is small and has a minimal memory footprint.
- Portable: Can be used in various projects, with examples provided in C.
The library can be built using the provided build scripts.
There are two ways to build the aPLib library:
A Python build script (build_aplib.py) is provided for a more flexible and cross-platform build process.
Requirements:
- Python 3.x
- FASM (the Flat Assembler)
Instructions:
-
Make sure you have Python and FASM installed and accessible from your system's PATH.
-
Open a terminal or command prompt in the
SRCdirectory. -
Run the following command:
python build_aplib.py
-
The script will assemble the source files and create the
APLIB.LIB(on Windows) oraplib.a(on Linux/macOS) static library.
A simple batch script (MakeLib.BAT) is provided for building on Windows.
Requirements:
- FASM (the Flat Assembler)
- Microsoft Visual Studio (for the
LIB.EXEtool)
Instructions:
-
Make sure you have FASM and Visual Studio installed.
-
Open a "Developer Command Prompt for VS" or make sure
FASM.EXEandLIB.EXEare in your system's PATH. -
Run the
MakeLib.BATscript from theSRCdirectory:MakeLib.BAT
-
The script will assemble the source files and create the
APLIB.LIBstatic library.
- Usage: A C example of how to use the aPLib library.
- API Reference: A full reference for the public functions in the library.
- Internals: A high-level overview of the internal workings of the aPLib compression algorithm.
The source code of this library is released into the public domain. You are free to use, modify, and distribute it for any purpose. No warranties of any kind are provided.
This is a project created for educational purposes. The code is provided as-is, without any warranty. Use at your own risk.
- Joergen Ibsen: Original author of aPLib.
- PhuQoan: Optimizations, AP-reverse mode and comments.