Struct huffman_compress::Book [] [src]

pub struct Book<K> { /* fields omitted */ }

A codebook used for encoding.

Methods

impl<K: Ord + Clone> Book<K>
[src]

[src]

Returns the underlying B-Tree.

[src]

An iterator over all symbols in sorted order.

[src]

An iterator over all symbol and code word pairs, sorted by symbol.

[src]

Returns the number of symbols in the book.

[src]

Returns true if the map has no symbols.

[src]

Returns the code word for a given symbol.

[src]

Returns true if the book contains the specified symbol.

[src]

Writes the code word for the given key to a bit vector.

Errors

Returns EncodeError if k is not in the codebook.

Trait Implementations

impl<K: Clone> Clone for Book<K>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<K: Debug> Debug for Book<K>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<K> Send for Book<K> where
    K: Send

impl<K> Sync for Book<K> where
    K: Sync