On Wed, Aug 27, 2025 at 2:29 PM Mateusz Viste via Freedos-user <
[email protected]> wrote:

> On 8/27/25 22:56, E. Auer via Freedos-user wrote:
> > I assume you enjoy designing algorithms, because there already are nice
> > and lightweight existing ones, too :-)
>
> Did not find any that does not require extra buffers for decompression,
> is fast on a 8088 and can be implemented within some 20 lines of C.
> Maybe I didn't look hard enough.
>

If you're willing to look past the Assembly language implementation, Jim
Leonard/trixter has a version of LZ4 that does well on 8088 (
http://www.oldskool.org/pc/lz4_8088/).  Maybe that could be translated to C
at a cost of some performance.

Additionally, jart from cosmopolitan libc/APE has a short C implementation
(though somewhat awkwardly organized, IMO) of LZ4.
https://github.com/jart/cosmopolitan/blob/1.0/libc/str/lz4decode.c
https://github.com/jart/cosmopolitan/blob/1.0/libc/str/lz4cpy.c
https://github.com/jart/cosmopolitan/blob/1.0/libc/str/lz4check.c
https://github.com/jart/cosmopolitan/blob/1.0/libc/nexgen32e/lz4.h
https://github.com/jart/cosmopolitan/blob/1.0/libc/nexgen32e/lzcnt.h
https://github.com/jart/cosmopolitan/blob/1.0/libc/nexgen32e/lzcnt.S
https://github.com/jart/cosmopolitan/blob/1.0/libc/nexgen32e/lzcntl.S
_______________________________________________
Freedos-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to