2 unstable releases

0.2.0 Aug 8, 2024
0.1.0 Feb 7, 2022

#239 in Compression

AGPL-3.0-or-later

59KB
751 lines

A chess compression library

This crate is a straight port of the Lichess move compression code from Java to Rust, but with a slightly different API. The Rust code passes the same test corpus as the Java code, so it should be compatible with compressed data from that library, but this hasn't been explored beyond passing the test corpus.


lib.rs:

A library for compressing chess moves. This is a straight Rust port of a Java original made by the Lichess project, but with a slightly different user-facing API.

Note that when decompressing, you need to know how many plies you want to decompress. This is because a given move sequence is not guaranteed to fill the last byte exactly. In this case, any trailing bits in the input would cause havoc if we didn't know how many elements to decompress.

Dependencies

~1.5MB
~25K SLoC