Skip to main content

Module decode

Module decode 

Source
Expand description

Recursive decode pipeline (base64, hex, url, unicode) with region management.

Re-exports§

pub use codec::decoder::decode_base64;
pub use codec::decoder::decode_bytes;
pub use codec::decoder::decode_file;
pub use codec::decoder::decode_file_with_rules;
pub use codec::decoder::decode_hex;
pub use codec::decoder::decode_regions;
pub use codec::decoder::decode_unicode;
pub use codec::decoder::decode_url;
pub use codec::decoder::GpuDecoder;
pub use codec::format::DecodeFormat;

Modules§

codec
The codec module. Doc.
dispatch
The dispatch module. Doc.

Structs§

DecodeRules
TOML-configurable decode thresholds and recursion limits.
DecodedRegion
A decoded region produced by one decode pass.
FrontierState
FrontierState struct.

Enums§

DecodeError
Error type for decode rule validation.
EntropyError
Error type for entropy computation.

Constants§

DEFAULT_REGION_EXPANSION
DEFAULT_REGION_EXPANSION constant.
MAX_INPUT_BYTES
MAX_INPUT_BYTES constant.
MAX_WINDOW_SIZE
MAX_WINDOW_SIZE constant.

Functions§

decode_frontier
decode_frontier function.
entropy_map_cpu
Compute Shannon entropy for each sliding window on CPU.
find_high_entropy_regions
Convert entropy values to contiguous high-entropy regions.
find_high_entropy_regions_with_window
find_high_entropy_regions_with_window function.
push_region
push_region function.
shannon_entropy
Uses f64 for the size division: f32 mantissa loses precision on files > 16 MB and the entropy estimate drifts.
stable_hash
stable_hash function.