ps2dev / ps2-packer

Create packed ELF files to run on the PS2
GNU General Public License v2.0
73 stars 28 forks source link

Add LZMA compression support #24

Closed luisdallos closed 5 years ago

luisdallos commented 5 years ago

Some tests (opl_stripped.elf from Open PS2 Loader 0.9.3+.1386-Beta-f112b26):

Original file size: 2305808 bytes

packer compressed size ratio time
lzo 1508572 34.58% 0m0,138s
lz4 1279220 44.52% 0m0,673s
zlib 1109555 51.88% 0m0,495s
n2b 1107884 51.95% 0m17,153s
n2d 1091868 52.65% 0m16,415s
n2e 1084760 52.96% 0m18,643s
lzma 827460 64.11% 0m1,419s

Note: The LZMA packer used in this test is the single-threaded one, the multi-threaded packer is even faster.

threads time
single 0m1,419s
multi 0m0,927s

The LZMA packer can be built without multi-thread support by passing LZMA_MT=0 to make, i.e. make LZMA_MT=0

I have uploaded pre-built binaries for the following platforms:

For testing purposes, I have included for each platform two builds: one with single-threaded LZMA packer and another with multi-threaded LZMA packer.

Test build: http://www.mediafire.com/file/8wbvxowj1hgj2og/ps2-packer-lzma.7z/file

Update: ps2-packer build with LZMA set as the default packer.

Test build: http://www.mediafire.com/file/gb976fegeq8rzff/ps2-packer-lzma-default.7z/file