Skip to content

Releases: bamler-lab/constriction

v0.4.1

23 Oct 10:27
Compare
Choose a tag to compare

v0.4.0

31 Aug 17:38
Compare
Choose a tag to compare

This release changes some trait bounds in the Rust API. It technically breaks backward compatibility (hence the bump in leading version number), but most projects will probably not notice these changes. Also, no "silent" changes are introduced, i.e., upgrading from constriction version 0.3 to this version (0.4) does not change compression behavior unless you decide to use any of the new features, so compressed data remains binary compatible.

However, after upgrading to this version, you might get some deprecation warnings (see details below) at compile time (in Rust) or at runtime (in Python). If you get such a warning, then it is highly recommended that you follow the upgrade instructions provided in the warnings because the next breaking version of constriction (version 0.5.0) will remove the deprecated methods from the Rust API, and it will change the default behavior of the Python constructor that currently prints a warning (thus breaking binary backward compatibility for compressed data).

New in This Release

  • "Lazy" categorical distributions (LazyContiguousCategoricalEntropyModel in the Rust API, or Categorical(..., lazy=True) in the Python API) to significantly speed up compression and decompression with autoregressive models.
  • For non-lazy categorical distributions, there is now a choice whether to construct them perfectly (as in version <= 0.3.5) or very slightly worse but potentially much faster (and compatibly with the "lazy" variant). To choose between the two, use the constructors from_[symbols_and_]floating_point_probabilities_{perfect, fast} in the Rust API, or Categorical(..., perfect={True, False}) in the Python API).

Changes in This Release

  • Increase minimum supported rust version (MSRV) to 1.75 (for return position impl trait in traits), see below.
  • The type signatures for lookup decoder models (Rust API only) was simplified. If your code uses lookup decoder models only via their type aliases (Small[Non]ContiguousLookupDecoderModel), then you probably won't notice this change.
  • IterableEntropyModel::symbol_table now returns an anonymous type (impl trait). While this technically breaks edge cases, it is extremely unlikely to cause issues, and it significantly cleans up the public API.

Deprecation Warnings (And Changes Planned for the Next Breaking Release)

  • In the Rust API, constructors for categorical distributions without the ..._fast or ..._perfect suffix are now deprecated. They currently forward to their respective ..._perfect variant for backward compatibility, but they will be removed in the next breaking version of constriction (version 0.5) because the suggest a default that is probably a poor choice in most cases (the ..._fast variant is a better choice for most new applications at this point).
  • In the Python API, constructing a categorical distribution with neither of the optional parameters fast nor perfect set currently defaults to perfect=True for backward compatibility, but it prints a deprecation warning when called for the first time within a python session. The warning explains that the default will change to perfect=False in the next breaking version of constriction (version 0.5) as it is more likely the better choice.
  • In the Python API, constriction.symbol.{Queue, Stack}Coder.get_compressed has been renamed to get_compressed_and_bitrate to avoid confusion about the return type. The old method currently still exists and forwards to the new method after printing a deprecation warning when called for the first time within a python session.

v0.3.5

14 Dec 20:35
ce28647
Compare
Choose a tag to compare

Fixes signatures in python wheels, see #43.

v0.3.4

13 Dec 22:18
Compare
Choose a tag to compare

Actually reduces the minimum required numpy version from 1.19 to 1.16.

The previous release already attempted to do this, but there was a mistake, see discussion in issue #40.

v0.3.3

12 Dec 20:13
4077f33
Compare
Choose a tag to compare

Reduces the minimum required numpy version from 1.19 to 1.16, as discussed in issue #40.

v0.3.2

04 Nov 23:21
Compare
Choose a tag to compare

Add support for python 3.12

v0.3.1

08 Jun 21:37
Compare
Choose a tag to compare

Allow 32-bit floating point representations for probabilities in the python API. This considerably simplifies prototyping.

The Rust API still uses 64 bit floating point precision since (i) internal calculations in the probability crate are done on f64s anyway, and (ii) the Rust API mostly favors iterators over vectors, so conversion to f64 does not require any copying.

v0.3.0

28 Jan 17:19
5adc4a0
Compare
Choose a tag to compare

Update rust dependency on probability to version 0.20, which now supports no_std. This is a breaking change since constriction exposes traits from probability through its public API.

We also now verify no_std compatibility in all CI workflows.

v0.2.6

20 Dec 17:38
Compare
Choose a tag to compare

Fix an issue where constructing a categorical probability distribution sometimes lead to an infinite loop (see Issue #20).

v0.2.5

29 Oct 01:40
Compare
Choose a tag to compare

Add support for recently released Python 3.11.