[−][src]Crate lzjd
LZJD
Rust implementation of the LZJD algorithm See also: https://github.com/EdwardRaff/jLZJD
Any core::hash::BuildHasher is supported, just pass a &BuildHasher to LZDict::from_bytes_stream. For convenience, this crate provides a wrapper around the crc32 hasher which implements BuildHasher.
Example
let stream_a = b"bitsandpieces".iter().cloned(); let stream_b = b"doctestbits".iter().cloned(); let k = 1024; let build_hasher = CRC32BuildHasher; let dict_a = LZDict::from_bytes_stream(stream_a, &build_hasher, k); let dict_b = LZDict::from_bytes_stream(stream_b, &build_hasher, k); let lzjd = dict_a.dist(&dict_b); assert_eq!(lzjd, 0.57142854);
Re-exports
pub use crate::lz_dict::LZDict; |
Modules
crc32 | Defines a wrapper around crc::crc32::Digest, implementing std::hash::Hasher as well as a std::hash::BuildHasher which builds the hasher. |
lz_dict | LZ dictionary implementation |
Enums
LZJDError |
Type Definitions
Result |