Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:21 16 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: LZ77 file compression/decompression

Author Message
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 03:32pm 18 Dec 2020
Copy link to clipboard 
Print this post

Hi all,

Attached is a file compression and decompression program for CMM2, and a matching Python implementation to run on a host machine.

The code is a straightforward port from Rich Geldreich's C implementation which can be found here:

https://gist.github.com/fogus/5401265

Usage:
- On CMM2:
*lz1 e <file> : encodes <file> into <file>.lz1
*lz1 d <file>.lz1 : decodes <file>.lz1 to <file>

- On Host:
python lz1 e <file> : encodes <file> into <file>.lz1
python lz1 d <file>.lz1 : decodes <file>.lz1 to <file>

I plan to include this as an option to MAR, Maximite Archiving Tool (https://github.com/epsilon537/mar_cmm2 ). Any similarity to tar is entirely coincidental.  

Cheers,
Epsilon.

README.md:

LZ1 LZ77 encoder/decoder
------------------------
Authors
-------
Original C implementation by Rich Geldreich.
MMBasic and Python ports by Epsilon.

Current Version
---------------
0.1

ChangeLog
---------
0.1: Initial version.

Description
-----------
lz1 performs LZ77 compression/decompression of a given input file.
Two compatible versions exist: lz1.bas for CMM2 and lz1.py for a Windows/MacOSX/Linux host.

The source code for the original C implementation can be found here:

https://gist.github.com/fogus/5401265

Usage
-----
CMM2:
*lz1 e <file> : encodes <file> into <file>.lz1
*lz1 d <file>.lz1 : decodes <file>.lz1 to <file>

Host:
python lz1 e <file> : encodes <file> into <file>.lz1
python lz1 d <file>.lz1 : decodes <file>.lz1 to <file>

Required CMM2 firmware version
------------------------------
V5.06.00

Required Python version
-----------------------
3.x

GitHub
------
https://github.com/epsilon537/lz1_cmm2

lz1.zip
Epsilon CMM2 projects
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 595
Posted: 07:05am 19 Dec 2020
Copy link to clipboard 
Print this post

cool ! thx
Plasma
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025