Skip to content

Commit 74a0037

Browse files
authored
docs improvements (#27)
1 parent 2d4cb5c commit 74a0037

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ A symbolic [arithmetic coding](https://en.wikipedia.org/wiki/Arithmetic_coding)
99

1010
Extending this library is as simple as implementing the `Model` trait for your own type, and then plugging it in the provided `Encoder`/`Decoder`. Supports both fixed-length and variable-length encoding, as well as both adaptive and non-adaptive models.
1111

12-
Take a look at the [API docs](https://docs.rs/arithmetic-coding/) or the [examples](https://github.com/danieleades/arithmetic-coding/tree/main/examples).
12+
Take a look at the [API docs](https://docs.rs/arithmetic-coding/) or the [examples](https://github.com/danieleades/arithmetic-coding/tree/main/examples).
13+
14+
This crate is heavily inspired by
15+
16+
- [arcode-rs](https://github.com/cgburgess/arcode-rs)
17+
- [Data Compression With Arithmetic Coding - *Mark Nelson*, 2014](https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html)

examples/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Examples
2+
3+
This crate has a number of examples, for various types of arithmetic encoding.
4+
5+
## [Integer](./integer.rs)
6+
7+
A simple example showing encoding of integers.
8+
9+
## [Symbolic](./symbolic.rs)
10+
11+
An example using custom symbols (you're not limited to primitive types!).
12+
13+
## [Fixed Length](./fixed_length.rs)
14+
15+
An example that uses a fixed length of symbols, rather than encoding EOF. Uses the `fixed_length` helpers from this crate.
16+
17+
## [Sherlock](./sherlock.rs)
18+
19+
Encodes the entire text of "The Adventures of Sherlock Holmes". By allowing a subset 'alphabet' of all possible characters, greater compression is achieved.
20+
21+
## [Fenwick Tree (Adaptive)](./fenwick_adaptive.rs)
22+
23+
Encodes "The Adventures of Sherlock Holmes" using an adaptive model based on [fenwick trees](https://en.wikipedia.org/wiki/Fenwick_tree).
24+
25+
## [Fenwick Tree (Context-Switcing)](./fenwick_adaptive.rs)
26+
27+
Encodes "The Adventures of Sherlock Holmes" using a *context switching* adaptive model based on [fenwick trees](https://en.wikipedia.org/wiki/Fenwick_tree). Achieves very high compression.

0 commit comments

Comments
 (0)