<commit_before>/*
 * ccn/coding.h
 * 
 * Copyright 2008 Palo Alto Research Center, Inc. All rights reserved.
 *
 * Details of the ccn binary wire encoding
 *
 * $Id$
 */

#ifndef CCN_CODING_DEFINED
#define CCN_CODING_DEFINED

#include <stddef.h>

#define CCN_TT_BITS 3
#define CCN_TT_MASK ((1 << CCN_TT_BITS) - 1)
#define CCN_MAX_TINY ((1 << (7-CCN_TT_BITS)) - 1)
#define CCN_TT_HBIT ((unsigned char)(1 << 7))

enum ccn_tt {
    CCN_EXT,        /* starts composite extension - numval is subtype */
    CCN_TAG,        /* starts composite - numval is tagnamelen-1 */ 
    CCN_DTAG,       /* starts composite - numval is tagdict index */
    CCN_ATTR,       /* attribute - numval is attrnamelen-1, value follows */
    CCN_DATTR,      /* attribute numval is attrdict index */
    CCN_BLOB,       /* opaque binary data - numval is byte count */
    CCN_UDATA,      /* UTF-8 encoded character data - numval is byte count */
    CCN_NO_TOKEN    /* should not occur in encoding */
};

/* CCN_CLOSE terminates composites */
#define CCN_CLOSE ((unsigned char)(0))

enum ccn_ext_subtype {
    /* skip smallest values for now */
    CCN_PROCESSING_INSTRUCTIONS = 16, /* <?name:U value:U?> */
};

enum ccn_dtag {
    CCN_DTAG_Name = 14,<commit_msg>include sys/types.h for ssize_t<commit_after>/*
 * ccn/coding.h
 * 
 * Copyright 2008 Palo Alto Research Center, Inc. All rights reserved.
 *
 * Details of the ccn binary wire encoding
 *
 * $Id$
 */

#ifndef CCN_CODING_DEFINED
#define CCN_CODING_DEFINED

#include <sys/types.h>
#include <stddef.h>

#define CCN_TT_BITS 3
#define CCN_TT_MASK ((1 << CCN_TT_BITS) - 1)
#define CCN_MAX_TINY ((1 << (7-CCN_TT_BITS)) - 1)
#define CCN_TT_HBIT ((unsigned char)(1 << 7))

enum ccn_tt {
    CCN_EXT,        /* starts composite extension - numval is subtype */
    CCN_TAG,        /* starts composite - numval is tagnamelen-1 */ 
    CCN_DTAG,       /* starts composite - numval is tagdict index */
    CCN_ATTR,       /* attribute - numval is attrnamelen-1, value follows */
    CCN_DATTR,      /* attribute numval is attrdict index */
    CCN_BLOB,       /* opaque binary data - numval is byte count */
    CCN_UDATA,      /* UTF-8 encoded character data - numval is byte count */
    CCN_NO_TOKEN    /* should not occur in encoding */
};

/* CCN_CLOSE terminates composites */
#define CCN_CLOSE ((unsigned char)(0))

enum ccn_ext_subtype {
    /* skip smallest values for now */
    CCN_PROCESSING_INSTRUCTIONS = 16, /* <?name:U value:U?> */
};

enum ccn_dtag {
    CCN_DTAG_Name = 14,
{'fraction_non_alphanumeric': 0.11491053677932406, 'fraction_numerical': 0.015904572564612324, 'mean_word_length': 2.8947368421052633, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '3795767', 'n_tokens_mistral': 933, 'n_tokens_neox': 886, 'n_words': 252}