<commit_before>use serialize::json::{Json, ToJson};

bitflags! {
    #[deriving(Show)] flags WSHeader: u16 {
        // Main structure, mask with & to get header parts
        static WS_FIN     = 0b1000000000000000, // final flag
        static WS_RSV     = 0b0111000000000000, // reserved
        static WS_OPCODE  = 0b0000111100000000, // opcode
        static WS_MASK    = 0b0000000010000000, // mask flag
        static WS_LEN     = 0b0000000001111111, // length

        // Opcodes, check for equality after masking with WS_OPCODE
        static WS_OPCONT  = 0b0000000000000000,
        static WS_OPTEXT  = 0b0000000100000000,
        static WS_OPBIN   = 0b0000001000000000,
        static WS_OPTERM  = 0b0000100000000000,
        static WS_OPPING  = 0b0000100100000000,
        static WS_OPPONG  = 0b0000101000000000,

        // Helper masks
        static WS_OPCTRL  = 0b0000100000000000, // if matches with &, this is a control code
        static WS_LEN16   = 0b0000000001111110, // if &WS_LEN equals this, it has 16-bit length
        static WS_LEN64   = 0b0000000001111111, // if &WS_LEN equals this, it has 32-bit length
    }
}

#[deriving(Show)]<commit_msg>bitflags! macro update: static -> const<commit_after>use serialize::json::{Json, ToJson};

bitflags! {
    #[deriving(Show)] flags WSHeader: u16 {
        // Main structure, mask with & to get header parts
        const WS_FIN     = 0b1000000000000000, // final flag
        const WS_RSV     = 0b0111000000000000, // reserved
        const WS_OPCODE  = 0b0000111100000000, // opcode
        const WS_MASK    = 0b0000000010000000, // mask flag
        const WS_LEN     = 0b0000000001111111, // length

        // Opcodes, check for equality after masking with WS_OPCODE
        const WS_OPCONT  = 0b0000000000000000,
        const WS_OPTEXT  = 0b0000000100000000,
        const WS_OPBIN   = 0b0000001000000000,
        const WS_OPTERM  = 0b0000100000000000,
        const WS_OPPING  = 0b0000100100000000,
        const WS_OPPONG  = 0b0000101000000000,

        // Helper masks
        const WS_OPCTRL  = 0b0000100000000000, // if matches with &, this is a control code
        const WS_LEN16   = 0b0000000001111110, // if &WS_LEN equals this, it has 16-bit length
        const WS_LEN64   = 0b0000000001111111, // if &WS_LEN equals this, it has 32-bit length
    }
}

#[deriving(Show)]
{'fraction_non_alphanumeric': 0.07640067911714771, 'fraction_numerical': 0.21052631578947367, 'mean_word_length': 2.5337331334332833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 36, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1326529', 'n_tokens_mistral': 1159, 'n_tokens_neox': 724, 'n_words': 203}