Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 106 additions & 151 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
members = [".", "arithmetic-coding-core", "fenwick-model"]

[workspace.package]
rust-version = "1.83.0"
edition = "2021"
rust-version = "1.85.0"
edition = "2024"
license = "MIT"
keywords = ["compression", "encoding", "arithmetic-coding", "lossless"]
categories = ["compression", "encoding", "parsing"]
Expand Down
2 changes: 1 addition & 1 deletion arithmetic-coding-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mod bitstore;
pub use bitstore::BitStore;

mod model;
pub use model::{fixed_length, max_length, one_shot, Model};
pub use model::{Model, fixed_length, max_length, one_shot};
2 changes: 1 addition & 1 deletion arithmetic-coding-core/src/model/one_shot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::ops::Range;

pub use crate::fixed_length::Wrapper;
use crate::{fixed_length, BitStore};
use crate::{BitStore, fixed_length};

/// A [`Model`] is used to calculate the probability of a given symbol occurring
/// in a sequence.
Expand Down
4 changes: 2 additions & 2 deletions benches/sherlock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::{fs::File, hint::black_box, io::Read, ops::Range};

use arithmetic_coding::Model;
use criterion::{criterion_group, criterion_main, Criterion};
use fenwick_model::{simple::FenwickModel, ValueError};
use criterion::{Criterion, criterion_group, criterion_main};
use fenwick_model::{ValueError, simple::FenwickModel};

mod common;

Expand Down
2 changes: 1 addition & 1 deletion examples/fenwick_adaptive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use arithmetic_coding::Model;

mod common;

use fenwick_model::{simple::FenwickModel, ValueError};
use fenwick_model::{ValueError, simple::FenwickModel};

const ALPHABET: &str =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,\n-':()[]#*;\"!?*&é/àâè%@$";
Expand Down
2 changes: 1 addition & 1 deletion examples/fenwick_context_switching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use arithmetic_coding::Model;

mod common;

use fenwick_model::{context_switching::FenwickModel, ValueError};
use fenwick_model::{ValueError, context_switching::FenwickModel};

const ALPHABET: &str =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,\n-':()[]#*;\"!?*&é/àâè%@$";
Expand Down
2 changes: 1 addition & 1 deletion src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::{io, ops::Range};
use bitstream_io::BitRead;

use crate::{
common::{self, assert_precision_sufficient},
BitStore, Model,
common::{self, assert_precision_sufficient},
};

// this algorithm is derived from this article - https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html
Expand Down
2 changes: 1 addition & 1 deletion src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::{io, ops::Range};
use bitstream_io::BitWrite;

use crate::{
common::{self, assert_precision_sufficient},
BitStore, Error, Model,
common::{self, assert_precision_sufficient},
};

// this algorithm is derived from this article - https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
missing_copy_implementations
)]

pub use arithmetic_coding_core::{fixed_length, max_length, one_shot, BitStore, Model};
pub use arithmetic_coding_core::{BitStore, Model, fixed_length, max_length, one_shot};

mod common;
pub mod decoder;
Expand Down
2 changes: 1 addition & 1 deletion tests/precision_checking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use std::{convert::Infallible, io::Cursor, ops::Range};

use arithmetic_coding::{decoder, encoder, Decoder, Encoder};
use arithmetic_coding::{Decoder, Encoder, decoder, encoder};
use arithmetic_coding_core::one_shot;
use bitstream_io::{BigEndian, BitReader, BitWriter};

Expand Down