ez-bencoding 0.2.0

ez-bencoding is a bencoding library, which uses the bdecode algorithm from libtorrent 3rd edition
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use bitfields::bitfield;

/// 解析 dict 或 list 过程中的会生成一个 stack, 
/// 其中每一个 StackFrame 元素都对应 dict 或 list 的入口 token .
#[bitfield(u32)]
#[derive(Clone, Copy)]
pub(crate) struct StackFrame {
    #[bits(31)]
    token: u32,

    #[bits(1)]
    state: u8,
}