diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index 71b2fe36..fa0ebd72 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -286,13 +286,10 @@ static void nghttp2_hd_ringbuf_pop_back(nghttp2_hd_ringbuf *ringbuf) } static int nghttp2_hd_context_init(nghttp2_hd_context *context, - nghttp2_hd_role role, - nghttp2_hd_side side, - size_t deflate_hd_table_bufsize_max) + nghttp2_hd_role role) { int rv; context->role = role; - context->side = side; context->bad = 0; context->hd_table_bufsize_max = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE; rv = nghttp2_hd_ringbuf_init @@ -302,41 +299,41 @@ static int nghttp2_hd_context_init(nghttp2_hd_context *context, return rv; } - context->deflate_hd_table_bufsize_max = deflate_hd_table_bufsize_max; - context->deflate_hd_table_bufsize = 0; - context->deflate_hd_tablelen = 0; context->hd_table_bufsize = 0; return 0; } -int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater, nghttp2_hd_side side) +int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater) { - return nghttp2_hd_deflate_init2(deflater, side, + return nghttp2_hd_deflate_init2(deflater, NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE); } int nghttp2_hd_deflate_init2(nghttp2_hd_deflater *deflater, - nghttp2_hd_side side, size_t deflate_hd_table_bufsize_max) { int rv; - rv = nghttp2_hd_context_init(&deflater->ctx, NGHTTP2_HD_ROLE_DEFLATE, side, - deflate_hd_table_bufsize_max); + rv = nghttp2_hd_context_init(&deflater->ctx, NGHTTP2_HD_ROLE_DEFLATE); if(rv != 0) { return rv; } deflater->no_refset = 0; + deflater->deflate_hd_table_bufsize_max = deflate_hd_table_bufsize_max; return 0; } -int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater, nghttp2_hd_side side) +int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater) { int rv; - rv = nghttp2_hd_context_init(&inflater->ctx, NGHTTP2_HD_ROLE_INFLATE, side, - NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE); + + rv = nghttp2_hd_context_init(&inflater->ctx, NGHTTP2_HD_ROLE_INFLATE); if(rv != 0) { return rv; } + + inflater->settings_hd_table_bufsize_max = + NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE; + inflater->ent_keep = NULL; inflater->name_keep = NULL; inflater->value_keep = NULL; @@ -559,16 +556,38 @@ static uint8_t* decode_length(ssize_t *res, int *final, ssize_t initial, return in + 1; } -static int emit_indexed0(uint8_t **buf_ptr, size_t *buflen_ptr, - size_t *offset_ptr) +static int emit_clear_refset(uint8_t **buf_ptr, size_t *buflen_ptr, + size_t *offset_ptr) { int rv; - rv = ensure_write_buffer(buf_ptr, buflen_ptr, *offset_ptr, 1); + uint8_t *bufp; + rv = ensure_write_buffer(buf_ptr, buflen_ptr, *offset_ptr, 2); if(rv != 0) { return rv; } - *(*buf_ptr + *offset_ptr) = 0x80u; - ++*offset_ptr; + bufp = *buf_ptr + *offset_ptr; + *bufp++ = 0x80u; + *bufp = 0x80u; + *offset_ptr += 2; + return 0; +} + +static int emit_table_size(uint8_t **buf_ptr, size_t *buflen_ptr, + size_t *offset_ptr, size_t table_size) +{ + int rv; + uint8_t *bufp; + size_t blocklen = 1 + count_encoded_length(table_size, 7); + rv = ensure_write_buffer(buf_ptr, buflen_ptr, *offset_ptr, blocklen); + if(rv != 0) { + return rv; + } + DEBUGF(fprintf(stderr, "emit table_size=%zu\n", table_size)); + bufp = *buf_ptr + *offset_ptr; + *bufp++ = 0x80u; + *bufp = 0; + encode_length(bufp, table_size, 7); + *offset_ptr += blocklen; return 0; } @@ -591,15 +610,14 @@ static int emit_indexed_block(uint8_t **buf_ptr, size_t *buflen_ptr, static size_t emit_string(uint8_t *buf, size_t buflen, size_t enclen, int huffman, - const uint8_t *str, size_t len, - nghttp2_hd_side side) + const uint8_t *str, size_t len) { size_t rv; *buf = huffman ? 1 << 7 : 0; rv = encode_length(buf, enclen, 7); buf += rv; if(huffman) { - nghttp2_hd_huff_encode(buf, buflen - rv, str, len, side); + nghttp2_hd_huff_encode(buf, buflen - rv, str, len); } else { assert(enclen == len); memcpy(buf, str, len); @@ -610,12 +628,11 @@ static size_t emit_string(uint8_t *buf, size_t buflen, static int emit_indname_block(uint8_t **buf_ptr, size_t *buflen_ptr, size_t *offset_ptr, size_t index, const uint8_t *value, size_t valuelen, - int inc_indexing, - nghttp2_hd_side side) + int inc_indexing) { int rv; uint8_t *bufp; - size_t encvallen = nghttp2_hd_huff_encode_count(value, valuelen, side); + size_t encvallen = nghttp2_hd_huff_encode_count(value, valuelen); size_t blocklen = count_encoded_length(index + 1, 6); int huffman = encvallen < valuelen; if(!huffman) { @@ -630,7 +647,7 @@ static int emit_indname_block(uint8_t **buf_ptr, size_t *buflen_ptr, *bufp = inc_indexing ? 0 : 0x40u; bufp += encode_length(bufp, index + 1, 6); bufp += emit_string(bufp, *buflen_ptr - (bufp - *buf_ptr), - encvallen, huffman, value, valuelen, side); + encvallen, huffman, value, valuelen); assert(bufp - (*buf_ptr + *offset_ptr) == (ssize_t)blocklen); *offset_ptr += blocklen; return 0; @@ -638,15 +655,14 @@ static int emit_indname_block(uint8_t **buf_ptr, size_t *buflen_ptr, static int emit_newname_block(uint8_t **buf_ptr, size_t *buflen_ptr, size_t *offset_ptr, nghttp2_nv *nv, - int inc_indexing, - nghttp2_hd_side side) + int inc_indexing) { int rv; uint8_t *bufp; size_t encnamelen = - nghttp2_hd_huff_encode_count(nv->name, nv->namelen, side); + nghttp2_hd_huff_encode_count(nv->name, nv->namelen); size_t encvallen = - nghttp2_hd_huff_encode_count(nv->value, nv->valuelen, side); + nghttp2_hd_huff_encode_count(nv->value, nv->valuelen); size_t blocklen = 1; int name_huffman = encnamelen < nv->namelen; int value_huffman = encvallen < nv->valuelen; @@ -665,9 +681,9 @@ static int emit_newname_block(uint8_t **buf_ptr, size_t *buflen_ptr, bufp = *buf_ptr + *offset_ptr; *bufp++ = inc_indexing ? 0 : 0x40u; bufp += emit_string(bufp, *buflen_ptr - (bufp - *buf_ptr), - encnamelen, name_huffman, nv->name, nv->namelen, side); + encnamelen, name_huffman, nv->name, nv->namelen); bufp += emit_string(bufp, *buflen_ptr - (bufp - *buf_ptr), - encvallen, value_huffman, nv->value, nv->valuelen, side); + encvallen, value_huffman, nv->value, nv->valuelen); *offset_ptr += blocklen; return 0; } @@ -707,11 +723,6 @@ static nghttp2_hd_entry* add_hd_table_incremental(nghttp2_hd_context *context, size_t index = context->hd_table.len - 1; nghttp2_hd_entry* ent = nghttp2_hd_ringbuf_get(&context->hd_table, index); context->hd_table_bufsize -= entry_room(ent->nv.namelen, ent->nv.valuelen); - if(context->hd_table_bufsize < context->deflate_hd_table_bufsize) { - context->deflate_hd_table_bufsize -= entry_room(ent->nv.namelen, - ent->nv.valuelen); - --context->deflate_hd_tablelen; - } if(context->role == NGHTTP2_HD_ROLE_DEFLATE) { if(ent->flags & NGHTTP2_HD_FLAG_IMPLICIT_EMIT) { /* Emit common header just before it slips away from the @@ -734,82 +745,19 @@ static nghttp2_hd_entry* add_hd_table_incremental(nghttp2_hd_context *context, free(ent); } } - while(context->deflate_hd_table_bufsize + room > - context->deflate_hd_table_bufsize_max - && context->deflate_hd_tablelen > 0) { - size_t index = context->deflate_hd_tablelen - 1; - nghttp2_hd_entry *ent = - nghttp2_hd_ringbuf_get(&context->hd_table, index); - context->deflate_hd_table_bufsize -= entry_room(ent->nv.namelen, - ent->nv.valuelen); - --context->deflate_hd_tablelen; - if(ent->flags & NGHTTP2_HD_FLAG_IMPLICIT_EMIT) { - /* Just like a normal eviction, implicit header must be - emitted twice. */ - rv = emit_implicit(buf_ptr, buflen_ptr, offset_ptr, index); - if(rv != 0) { - return NULL; - } - ent->flags ^= NGHTTP2_HD_FLAG_IMPLICIT_EMIT; - } - if(ent->flags & NGHTTP2_HD_FLAG_REFSET) { - /* We need to drop entry from reference set. */ - rv = emit_indexed_block(buf_ptr, buflen_ptr, offset_ptr, index); - if(rv != 0) { - return NULL; - } - ent->flags ^= NGHTTP2_HD_FLAG_REFSET; - } - /* Release memory. We don't remove entry from the header table - at this moment. */ - if(ent->flags & NGHTTP2_HD_FLAG_NAME_ALLOC) { - free(ent->nv.name); - ent->nv.name = NULL; - ent->flags ^= NGHTTP2_HD_FLAG_NAME_ALLOC; - } - if(ent->flags & NGHTTP2_HD_FLAG_VALUE_ALLOC) { - free(ent->nv.value); - ent->nv.value = NULL; - ent->flags ^= NGHTTP2_HD_FLAG_VALUE_ALLOC; - } - } new_ent = malloc(sizeof(nghttp2_hd_entry)); if(new_ent == NULL) { return NULL; } - if(context->role == NGHTTP2_HD_ROLE_DEFLATE && - room > context->deflate_hd_table_bufsize_max) { - uint8_t flags = entry_flags & - ~(NGHTTP2_HD_FLAG_NAME_ALLOC | NGHTTP2_HD_FLAG_VALUE_ALLOC | - NGHTTP2_HD_FLAG_NAME_GIFT | NGHTTP2_HD_FLAG_VALUE_GIFT); - rv = nghttp2_hd_entry_init(new_ent, flags, - NULL, nv->namelen, NULL, nv->valuelen); - if(rv != 0) { - free(new_ent); - return NULL; - } - if(flags & NGHTTP2_HD_FLAG_NAME_GIFT) { - free(nv->name); - nv->name = NULL; - } - if(flags & NGHTTP2_HD_FLAG_VALUE_GIFT) { - free(nv->value); - nv->value = NULL; - } - /* caller must emit indexed repr to toggle off new_ent from - reference set. We cannot do it here because it may break the - indexing. */ - } else { - rv = nghttp2_hd_entry_init(new_ent, - entry_flags, - nv->name, nv->namelen, nv->value, nv->valuelen); - if(rv != 0) { - free(new_ent); - return NULL; - } + rv = nghttp2_hd_entry_init(new_ent, entry_flags, + nv->name, nv->namelen, nv->value, nv->valuelen); + if(rv != 0) { + free(new_ent); + return NULL; } + if(room > context->hd_table_bufsize_max) { /* The entry taking more than NGHTTP2_HD_MAX_BUFFER_SIZE is immediately evicted. */ @@ -817,11 +765,8 @@ static nghttp2_hd_entry* add_hd_table_incremental(nghttp2_hd_context *context, } else { context->hd_table_bufsize += room; nghttp2_hd_ringbuf_push_front(&context->hd_table, new_ent); - if(room <= context->deflate_hd_table_bufsize_max) { - new_ent->flags |= NGHTTP2_HD_FLAG_REFSET; - context->deflate_hd_table_bufsize += room; - ++context->deflate_hd_tablelen; - } + + new_ent->flags |= NGHTTP2_HD_FLAG_REFSET; } return new_ent; } @@ -851,7 +796,7 @@ static search_result search_hd_table(nghttp2_hd_context *context, uint32_t value_hash = hash(nv->value, nv->valuelen); ssize_t left = -1, right = STATIC_TABLE_LENGTH; - for(i = 0; i < context->deflate_hd_tablelen; ++i) { + for(i = 0; i < context->hd_table.len; ++i) { nghttp2_hd_entry *ent = nghttp2_hd_ringbuf_get(&context->hd_table, i); if(ent->name_hash == name_hash && name_eq(&ent->nv, nv)) { if(res.index == -1) { @@ -893,35 +838,59 @@ static search_result search_hd_table(nghttp2_hd_context *context, return res; } -int nghttp2_hd_change_table_size(nghttp2_hd_context *context, - size_t hd_table_bufsize_max) +static void hd_context_shrink_table_size(nghttp2_hd_context *context) { - int rv; - rv = nghttp2_hd_ringbuf_reserve - (&context->hd_table, hd_table_bufsize_max / NGHTTP2_HD_ENTRY_OVERHEAD); - if(rv != 0) { - return rv; - } - context->hd_table_bufsize_max = hd_table_bufsize_max; - if(context->role == NGHTTP2_HD_ROLE_INFLATE) { - context->deflate_hd_table_bufsize_max = hd_table_bufsize_max; - } while(context->hd_table_bufsize > context->hd_table_bufsize_max && context->hd_table.len > 0) { size_t index = context->hd_table.len - 1; nghttp2_hd_entry* ent = nghttp2_hd_ringbuf_get(&context->hd_table, index); context->hd_table_bufsize -= entry_room(ent->nv.namelen, ent->nv.valuelen); - if(context->hd_table_bufsize < context->deflate_hd_table_bufsize) { - context->deflate_hd_table_bufsize -= entry_room(ent->nv.namelen, - ent->nv.valuelen); - --context->deflate_hd_tablelen; - } nghttp2_hd_ringbuf_pop_back(&context->hd_table); if(--ent->ref == 0) { nghttp2_hd_entry_free(ent); free(ent); } } +} + +int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater, + size_t settings_hd_table_bufsize_max) +{ + int rv; + size_t next_bufsize = nghttp2_min(settings_hd_table_bufsize_max, + deflater->deflate_hd_table_bufsize_max); + rv = nghttp2_hd_ringbuf_reserve + (&deflater->ctx.hd_table, next_bufsize / NGHTTP2_HD_ENTRY_OVERHEAD); + if(rv != 0) { + return rv; + } + + deflater->ctx.hd_table_bufsize_max = settings_hd_table_bufsize_max; + + if(settings_hd_table_bufsize_max >= deflater->deflate_hd_table_bufsize_max) { + /* On the next encoding, we sends encoding context update with + deflater->deflate_hd_table_bufsize_max if it is strictly + smaller than settings_hd_table_bufsize_max. */ + return 0; + } + hd_context_shrink_table_size(&deflater->ctx); + return 0; +} + +int nghttp2_hd_inflate_change_table_size(nghttp2_hd_inflater *inflater, + size_t settings_hd_table_bufsize_max) +{ + int rv; + + rv = nghttp2_hd_ringbuf_reserve + (&inflater->ctx.hd_table, + settings_hd_table_bufsize_max / NGHTTP2_HD_ENTRY_OVERHEAD); + if(rv != 0) { + return rv; + } + inflater->settings_hd_table_bufsize_max = settings_hd_table_bufsize_max; + inflater->ctx.hd_table_bufsize_max = settings_hd_table_bufsize_max; + hd_context_shrink_table_size(&inflater->ctx); return 0; } @@ -962,9 +931,8 @@ nghttp2_hd_entry* nghttp2_hd_table_get(nghttp2_hd_context *context, static int hd_deflate_should_indexing(nghttp2_hd_deflater *deflater, const nghttp2_nv *nv) { - size_t table_size = nghttp2_min(deflater->ctx.deflate_hd_table_bufsize_max, - deflater->ctx.hd_table_bufsize_max); - if(entry_room(nv->namelen, nv->valuelen) > table_size * 3 / 4) { + if(entry_room(nv->namelen, nv->valuelen) > + deflater->ctx.hd_table_bufsize_max * 3 / 4) { return 0; } #ifdef NGHTTP2_XHD @@ -1006,9 +974,9 @@ static int deflate_nv(nghttp2_hd_deflater *deflater, nghttp2_hd_entry_free(new_ent); free(new_ent); new_ent = NULL; - } else if(new_ent->nv.name != NULL) { - /* new_ent->ref > 0 and nv.name is not NULL means that new_ent is - in the reference set and in deflate_hd_table_bufsize */ + } else { + /* new_ent->ref > 0 means that new_ent is in the reference + set */ new_ent->flags |= NGHTTP2_HD_FLAG_EMIT; } rv = emit_indexed_block(buf_ptr, buflen_ptr, offset_ptr, index); @@ -1080,20 +1048,18 @@ static int deflate_nv(nghttp2_hd_deflater *deflater, if(new_ent->ref == 0) { nghttp2_hd_entry_free(new_ent); free(new_ent); - } else if(new_ent->nv.name != NULL) { - /* new_ent->ref > 0 and nv.name is not NULL means that new_ent is - in the reference set and in deflate_hd_table_bufsize */ + } else { + /* new_ent->ref > 0 means that new_ent is in the reference + set. */ new_ent->flags |= NGHTTP2_HD_FLAG_EMIT; } incidx = 1; } if(index == -1) { - rv = emit_newname_block(buf_ptr, buflen_ptr, offset_ptr, nv, incidx, - deflater->ctx.side); + rv = emit_newname_block(buf_ptr, buflen_ptr, offset_ptr, nv, incidx); } else { rv = emit_indname_block(buf_ptr, buflen_ptr, offset_ptr, index, - nv->value, nv->valuelen, incidx, - deflater->ctx.side); + nv->value, nv->valuelen, incidx); } if(rv != 0) { return rv; @@ -1135,8 +1101,20 @@ ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, return NGHTTP2_ERR_HEADER_COMP; } offset = nv_offset; + + if(deflater->ctx.hd_table_bufsize_max > + deflater->deflate_hd_table_bufsize_max) { + rv = emit_table_size(buf_ptr, buflen_ptr, &offset, + deflater->deflate_hd_table_bufsize_max); + if(rv != 0) { + goto fail; + } + deflater->ctx.hd_table_bufsize_max = + deflater->deflate_hd_table_bufsize_max; + } + if(deflater->no_refset) { - rv = emit_indexed0(buf_ptr, buflen_ptr, &offset); + rv = emit_clear_refset(buf_ptr, buflen_ptr, &offset); if(rv != 0) { goto fail; } @@ -1148,7 +1126,7 @@ ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, goto fail; } } - for(i = 0; i < deflater->ctx.deflate_hd_tablelen; ++i) { + for(i = 0; i < deflater->ctx.hd_table.len; ++i) { nghttp2_hd_entry *ent = nghttp2_hd_ringbuf_get(&deflater->ctx.hd_table, i); rv = deflate_post_process_hd_entry(ent, i, buf_ptr, buflen_ptr, &offset); if(rv != 0) { @@ -1414,11 +1392,17 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater, DEBUGF(fprintf(stderr, "nghtp2_hd_infalte_hd start state=%d\n", inflater->state)); + hd_inflate_keep_free(inflater); *inflate_flags = NGHTTP2_HD_INFLATE_NONE; for(; in != last;) { switch(inflater->state) { case NGHTTP2_HD_STATE_OPCODE: - if(*in & 0x80u) { + if(*in == 0x80u) { + DEBUGF(fprintf(stderr, "Encoding context update\n")); + inflater->opcode = NGHTTP2_HD_OPCODE_INDEXED; + inflater->state = NGHTTP2_HD_STATE_CONTEXT_UPDATE; + ++in; + } else if(*in & 0x80u) { DEBUGF(fprintf(stderr, "Indexed repr\n")); inflater->opcode = NGHTTP2_HD_OPCODE_INDEXED; inflater->state = NGHTTP2_HD_STATE_READ_INDEX; @@ -1441,6 +1425,38 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater, } inflater->left = 0; break; + case NGHTTP2_HD_STATE_CONTEXT_UPDATE: + if(*in & 0x80u) { + if(*in != 0x80u) { + rv = NGHTTP2_ERR_HEADER_COMP; + goto fail; + } + ++in; + DEBUGF(fprintf(stderr, "Clearing reference set\n")); + clear_refset(&inflater->ctx); + inflater->state = NGHTTP2_HD_STATE_OPCODE; + break; + } + /* Header table size change */ + DEBUGF(fprintf(stderr, "Header table size change\n")); + inflater->state = NGHTTP2_HD_STATE_READ_TABLE_SIZE; + break; + case NGHTTP2_HD_STATE_READ_TABLE_SIZE: + rfin = 0; + rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, + inflater->settings_hd_table_bufsize_max); + if(rv < 0) { + goto fail; + } + in += rv; + if(!rfin) { + return in - first; + } + DEBUGF(fprintf(stderr, "table_size=%zd\n", inflater->left)); + inflater->ctx.hd_table_bufsize_max = inflater->left; + hd_context_shrink_table_size(&inflater->ctx); + inflater->state = NGHTTP2_HD_STATE_OPCODE; + break; case NGHTTP2_HD_STATE_READ_INDEX: rfin = 0; rv = hd_inflate_read_len(inflater, &rfin, in, last, @@ -1457,12 +1473,7 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater, DEBUGF(fprintf(stderr, "index=%zd\n", inflater->left)); if(inflater->opcode == NGHTTP2_HD_OPCODE_INDEXED) { inflater->index = inflater->left; - if(inflater->index == 0) { - DEBUGF(fprintf(stderr, "Clearing reference set\n")); - clear_refset(&inflater->ctx); - inflater->state = NGHTTP2_HD_STATE_OPCODE; - break; - } + assert(inflater->index > 0); --inflater->index; rv = hd_inflate_commit_indexed(inflater, nv_out); if(rv < 0) { @@ -1504,8 +1515,7 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater, } rv = 0; if(inflater->huffman_encoded) { - nghttp2_hd_huff_decode_context_init(&inflater->huff_decode_ctx, - inflater->ctx.side); + nghttp2_hd_huff_decode_context_init(&inflater->huff_decode_ctx); rv = nghttp2_buffer_reserve(&inflater->namebuf, guess_huff_decode_len(inflater->left)); if(rv != 0) { @@ -1579,8 +1589,7 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater, return in - first; } if(inflater->huffman_encoded) { - nghttp2_hd_huff_decode_context_init(&inflater->huff_decode_ctx, - inflater->ctx.side); + nghttp2_hd_huff_decode_context_init(&inflater->huff_decode_ctx); rv = nghttp2_buffer_reserve(&inflater->valuebuf, guess_huff_decode_len(inflater->left)); inflater->state = NGHTTP2_HD_STATE_READ_VALUEHUFF; @@ -1678,19 +1687,21 @@ int nghttp2_hd_inflate_end_headers(nghttp2_hd_inflater *inflater) int nghttp2_hd_emit_indname_block(uint8_t **buf_ptr, size_t *buflen_ptr, size_t *offset_ptr, size_t index, const uint8_t *value, size_t valuelen, - int inc_indexing, - nghttp2_hd_side side) + int inc_indexing) { return emit_indname_block(buf_ptr, buflen_ptr, offset_ptr, - index, value, valuelen, inc_indexing, - side); + index, value, valuelen, inc_indexing); } int nghttp2_hd_emit_newname_block(uint8_t **buf_ptr, size_t *buflen_ptr, size_t *offset_ptr, nghttp2_nv *nv, - int inc_indexing, - nghttp2_hd_side side) + int inc_indexing) { - return emit_newname_block(buf_ptr, buflen_ptr, offset_ptr, nv, inc_indexing, - side); + return emit_newname_block(buf_ptr, buflen_ptr, offset_ptr, nv, inc_indexing); +} + +int nghttp2_hd_emit_table_size(uint8_t **buf_ptr, size_t *buflen_ptr, + size_t *offset_ptr, size_t table_size) +{ + return emit_table_size(buf_ptr, buflen_ptr, offset_ptr, table_size); } diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index c77101e2..d8db8ce0 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -22,8 +22,8 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef NGHTTP2_HD_COMP_H -#define NGHTTP2_HD_COMP_H +#ifndef NGHTTP2_HD_H +#define NGHTTP2_HD_H #ifdef HAVE_CONFIG_H # include @@ -48,11 +48,6 @@ encoder only uses the memory up to this value. */ #define NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE (1 << 12) -typedef enum { - NGHTTP2_HD_SIDE_REQUEST = 0, - NGHTTP2_HD_SIDE_RESPONSE = 1 -} nghttp2_hd_side; - typedef enum { NGHTTP2_HD_ROLE_DEFLATE, NGHTTP2_HD_ROLE_INFLATE @@ -108,6 +103,8 @@ typedef enum { typedef enum { NGHTTP2_HD_STATE_OPCODE, + NGHTTP2_HD_STATE_CONTEXT_UPDATE, + NGHTTP2_HD_STATE_READ_TABLE_SIZE, NGHTTP2_HD_STATE_READ_INDEX, NGHTTP2_HD_STATE_NEWNAME_CHECK_NAMELEN, NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN, @@ -126,30 +123,10 @@ typedef struct { is the sum of length of name/value in hd_table + NGHTTP2_HD_ENTRY_OVERHEAD bytes overhead per each entry. */ size_t hd_table_bufsize; - /* The header table size for decoding. If the context is initialized - as encoder, this value is advertised by remote endpoint - decoder. */ + /* The effective header table size. */ size_t hd_table_bufsize_max; - /* The current effective header table size for encoding. This value - is always equal to |hd_table_bufsize| on decoder - context. |deflate_hd_table_bufsize| <= |hd_table_bufsize| must be - hold. */ - size_t deflate_hd_table_bufsize; - /* The maximum effective header table for encoding. Although header - table size is bounded by |hd_table_bufsize_max|, the encoder can - use smaller buffer by not retaining the header name/values beyond - the |deflate_hd_table_bufsize_max| and not referencing those - entries. This value is always equal to |hd_table_bufsize_max| on - decoder context. */ - size_t deflate_hd_table_bufsize_max; - /* The number of effective entry in |hd_table|. This value is always - equal to hd_table.len on decoder side. */ - size_t deflate_hd_tablelen; /* Role of this context; deflate or infalte */ nghttp2_hd_role role; - /* NGHTTP2_HD_SIDE_REQUEST for processing request, otherwise - response. */ - nghttp2_hd_side side; /* If inflate/deflate error occurred, this value is set to 1 and further invocation of inflate/deflate will fail with NGHTTP2_ERR_HEADER_COMP. */ @@ -158,6 +135,8 @@ typedef struct { typedef struct { nghttp2_hd_context ctx; + /* The upper limit of the header table size the deflater accepts. */ + size_t deflate_hd_table_bufsize_max; /* Set to this nonzero to clear reference set on each deflation each time. */ uint8_t no_refset; @@ -189,6 +168,9 @@ typedef struct { /* The index of header table to toggle off the entry from reference set at the end of decompression. */ size_t end_headers_index; + /* The maximum header table size the inflater supports. This is the + same value transmitted in SETTINGS_HEADER_TABLE_SIZE */ + size_t settings_hd_table_bufsize_max; nghttp2_hd_opcode opcode; nghttp2_hd_inflate_state state; /* nonzero if string is huffman encoded */ @@ -230,8 +212,7 @@ void nghttp2_hd_entry_free(nghttp2_hd_entry *ent); * NGHTTP2_ERR_NOMEM * Out of memory. */ -int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater, - nghttp2_hd_side side); +int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater); /* * Initializes |deflater| for deflating name/values pairs. @@ -247,7 +228,6 @@ int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater, * Out of memory. */ int nghttp2_hd_deflate_init2(nghttp2_hd_deflater *deflater, - nghttp2_hd_side side, size_t deflate_hd_table_bufsize_max); /* @@ -259,8 +239,7 @@ int nghttp2_hd_deflate_init2(nghttp2_hd_deflater *deflater, * NGHTTP2_ERR_NOMEM * Out of memory. */ -int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater, - nghttp2_hd_side side); +int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater); /* * Deallocates any resources allocated for |deflater|. @@ -282,10 +261,11 @@ void nghttp2_hd_deflate_set_no_refset(nghttp2_hd_deflater *deflater, uint8_t no_refset); /* - * Changes header table size in |context|. This may trigger eviction - * in the dynamic table. + * Changes header table size of the |deflater|. This may trigger + * eviction in the dynamic table. * - * This function can be used for deflater and inflater. + * The |settings_hd_table_bufsize_max| should be the value received in + * SETTINGS_HEADER_TABLE_SIZE. * * This function returns 0 if it succeeds, or one of the following * negative error codes: @@ -293,8 +273,25 @@ void nghttp2_hd_deflate_set_no_refset(nghttp2_hd_deflater *deflater, * NGHTTP2_ERR_NOMEM * Out of memory. */ -int nghttp2_hd_change_table_size(nghttp2_hd_context *context, - size_t hd_table_bufsize_max); +int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater, + size_t settings_hd_table_bufsize_max); + +/* + * Changes header table size in the |inflater|. This may trigger + * eviction in the dynamic table. + * + * The |settings_hd_table_bufsize_max| should be the value transmitted + * in SETTINGS_HEADER_TABLE_SIZE. + * + * This function returns 0 if it succeeds, or one of the following + * negative error codes: + * + * NGHTTP2_ERR_NOMEM + * Out of memory. + */ +int nghttp2_hd_inflate_change_table_size(nghttp2_hd_inflater *inflater, + size_t settings_hd_table_bufsize_max); + /* * Deflates the |nva|, which has the |nvlen| name/value pairs, into @@ -379,14 +376,16 @@ int nghttp2_hd_inflate_end_headers(nghttp2_hd_inflater *inflater); int nghttp2_hd_emit_indname_block(uint8_t **buf_ptr, size_t *buflen_ptr, size_t *offset_ptr, size_t index, const uint8_t *value, size_t valuelen, - int inc_indexing, - nghttp2_hd_side side); + int inc_indexing); /* For unittesting purpose */ int nghttp2_hd_emit_newname_block(uint8_t **buf_ptr, size_t *buflen_ptr, size_t *offset_ptr, nghttp2_nv *nv, - int inc_indexing, - nghttp2_hd_side side); + int inc_indexing); + +/* For unittesting purpose */ +int nghttp2_hd_emit_table_size(uint8_t **buf_ptr, size_t *buflen_ptr, + size_t *offset_ptr, size_t table_size); /* For unittesting purpose */ nghttp2_hd_entry* nghttp2_hd_table_get(nghttp2_hd_context *context, @@ -395,37 +394,30 @@ nghttp2_hd_entry* nghttp2_hd_table_get(nghttp2_hd_context *context, /* Huffman encoding/decoding functions */ /* - * Counts the required bytes to encode |src| with length |len|. If - * |side| is NGHTTP2_HD_SIDE_REQUEST, the request huffman code table - * is used. Otherwise, the response code table is used. + * Counts the required bytes to encode |src| with length |len|. * * This function returns the number of required bytes to encode given * data, including padding of prefix of terminal symbol code. This * function always succeeds. */ -size_t nghttp2_hd_huff_encode_count(const uint8_t *src, size_t len, - nghttp2_hd_side side); +size_t nghttp2_hd_huff_encode_count(const uint8_t *src, size_t len); /* * Encodes the given data |src| with length |srclen| to the given * memory location pointed by |dest|, allocated at lest |destlen| * bytes. The caller is responsible to specify |destlen| at least the - * length that nghttp2_hd_huff_encode_count() returns. If |side| is - * NGHTTP2_HD_SIDE_REQUEST, the request huffman code table is - * used. Otherwise, the response code table is used. + * length that nghttp2_hd_huff_encode_count() returns. * * This function returns the number of written bytes, including * padding of prefix of terminal symbol code. This return value is * exactly the same with the return value of - * nghttp2_hd_huff_encode_count() if it is given with the same |src|, - * |srclen|, and |side|. This function always succeeds. + * nghttp2_hd_huff_encode_count() if it is given with the same |src| + * and |srclen|. This function always succeeds. */ ssize_t nghttp2_hd_huff_encode(uint8_t *dest, size_t destlen, - const uint8_t *src, size_t srclen, - nghttp2_hd_side side); + const uint8_t *src, size_t srclen); -void nghttp2_hd_huff_decode_context_init(nghttp2_hd_huff_decode_context *ctx, - nghttp2_hd_side side); +void nghttp2_hd_huff_decode_context_init(nghttp2_hd_huff_decode_context *ctx); /* * Decodes the given data |src| with length |srclen|. The |ctx| must @@ -453,4 +445,4 @@ ssize_t nghttp2_hd_huff_decode(nghttp2_hd_huff_decode_context *ctx, nghttp2_buffer *dest, const uint8_t *src, size_t srclen, int final); -#endif /* NGHTTP2_HD_COMP_H */ +#endif /* NGHTTP2_HD_H */ diff --git a/lib/nghttp2_hd_huffman.c b/lib/nghttp2_hd_huffman.c index 9c47f0b5..93abafe9 100644 --- a/lib/nghttp2_hd_huffman.c +++ b/lib/nghttp2_hd_huffman.c @@ -30,11 +30,8 @@ #include "nghttp2_hd.h" -extern const nghttp2_huff_sym req_huff_sym_table[]; -extern const nghttp2_huff_decode req_huff_decode_table[][16]; - -extern const nghttp2_huff_sym res_huff_sym_table[]; -extern const nghttp2_huff_decode res_huff_decode_table[][16]; +extern const nghttp2_huff_sym huff_sym_table[]; +extern const nghttp2_huff_decode huff_decode_table[][16]; /* * Encodes huffman code |sym| into |*dest_ptr|, whose least |rembits| @@ -65,18 +62,11 @@ static size_t huff_encode_sym(uint8_t **dest_ptr, size_t rembits, return rembits; } -size_t nghttp2_hd_huff_encode_count(const uint8_t *src, size_t len, - nghttp2_hd_side side) +size_t nghttp2_hd_huff_encode_count(const uint8_t *src, size_t len) { size_t i; size_t nbits = 0; - const nghttp2_huff_sym *huff_sym_table; - if(side == NGHTTP2_HD_SIDE_REQUEST) { - huff_sym_table = req_huff_sym_table; - } else { - huff_sym_table = res_huff_sym_table; - } for(i = 0; i < len; ++i) { nbits += huff_sym_table[src[i]].nbits; } @@ -85,19 +75,12 @@ size_t nghttp2_hd_huff_encode_count(const uint8_t *src, size_t len, } ssize_t nghttp2_hd_huff_encode(uint8_t *dest, size_t destlen, - const uint8_t *src, size_t srclen, - nghttp2_hd_side side) + const uint8_t *src, size_t srclen) { int rembits = 8; uint8_t *dest_first = dest; size_t i; - const nghttp2_huff_sym *huff_sym_table; - if(side == NGHTTP2_HD_SIDE_REQUEST) { - huff_sym_table = req_huff_sym_table; - } else { - huff_sym_table = res_huff_sym_table; - } for(i = 0; i < srclen; ++i) { const nghttp2_huff_sym *sym = &huff_sym_table[src[i]]; if(rembits == 8) { @@ -114,14 +97,8 @@ ssize_t nghttp2_hd_huff_encode(uint8_t *dest, size_t destlen, return dest - dest_first; } -void nghttp2_hd_huff_decode_context_init(nghttp2_hd_huff_decode_context *ctx, - nghttp2_hd_side side) +void nghttp2_hd_huff_decode_context_init(nghttp2_hd_huff_decode_context *ctx) { - if(side == NGHTTP2_HD_SIDE_REQUEST) { - ctx->huff_decode_table = req_huff_decode_table; - } else { - ctx->huff_decode_table = res_huff_decode_table; - } ctx->state = 0; ctx->accept = 1; } @@ -137,7 +114,7 @@ ssize_t nghttp2_hd_huff_decode(nghttp2_hd_huff_decode_context *ctx, for(i = 0; i < srclen; ++i) { uint8_t in = src[i] >> 4; for(j = 0; j < 2; ++j) { - const nghttp2_huff_decode *t = &ctx->huff_decode_table[ctx->state][in]; + const nghttp2_huff_decode *t = &huff_decode_table[ctx->state][in]; if(t->state == -1) { return NGHTTP2_ERR_HEADER_COMP; } diff --git a/lib/nghttp2_hd_huffman.h b/lib/nghttp2_hd_huffman.h index 50372b9d..fa992061 100644 --- a/lib/nghttp2_hd_huffman.h +++ b/lib/nghttp2_hd_huffman.h @@ -52,7 +52,6 @@ typedef struct { typedef nghttp2_huff_decode huff_decode_table_type[16]; typedef struct { - const huff_decode_table_type *huff_decode_table; /* Current huffman decoding state. We stripped leaf nodes, so the value range is [0..255], inclusive. */ uint8_t state; diff --git a/lib/nghttp2_hd_huffman_data.c b/lib/nghttp2_hd_huffman_data.c index 646aecdc..76ff83d1 100644 --- a/lib/nghttp2_hd_huffman_data.c +++ b/lib/nghttp2_hd_huffman_data.c @@ -24,7 +24,7 @@ */ #include "nghttp2_hd_huffman.h" -const nghttp2_huff_sym req_huff_sym_table[] = { +const nghttp2_huff_sym huff_sym_table[] = { { 27, 0x7ffffbau }, { 27, 0x7ffffbbu }, { 27, 0x7ffffbcu }, @@ -284,267 +284,7 @@ const nghttp2_huff_sym req_huff_sym_table[] = { { 26, 0x3ffffdcu } }; -const nghttp2_huff_sym res_huff_sym_table[] = { - { 25, 0x1ffffbcu }, - { 25, 0x1ffffbdu }, - { 25, 0x1ffffbeu }, - { 25, 0x1ffffbfu }, - { 25, 0x1ffffc0u }, - { 25, 0x1ffffc1u }, - { 25, 0x1ffffc2u }, - { 25, 0x1ffffc3u }, - { 25, 0x1ffffc4u }, - { 25, 0x1ffffc5u }, - { 25, 0x1ffffc6u }, - { 25, 0x1ffffc7u }, - { 25, 0x1ffffc8u }, - { 25, 0x1ffffc9u }, - { 25, 0x1ffffcau }, - { 25, 0x1ffffcbu }, - { 25, 0x1ffffccu }, - { 25, 0x1ffffcdu }, - { 25, 0x1ffffceu }, - { 25, 0x1ffffcfu }, - { 25, 0x1ffffd0u }, - { 25, 0x1ffffd1u }, - { 25, 0x1ffffd2u }, - { 25, 0x1ffffd3u }, - { 25, 0x1ffffd4u }, - { 25, 0x1ffffd5u }, - { 25, 0x1ffffd6u }, - { 25, 0x1ffffd7u }, - { 25, 0x1ffffd8u }, - { 25, 0x1ffffd9u }, - { 25, 0x1ffffdau }, - { 25, 0x1ffffdbu }, - { 4, 0x0u }, - { 12, 0xffau }, - { 7, 0x6au }, - { 13, 0x1ffau }, - { 14, 0x3ffcu }, - { 9, 0x1ecu }, - { 10, 0x3f8u }, - { 13, 0x1ffbu }, - { 9, 0x1edu }, - { 9, 0x1eeu }, - { 12, 0xffbu }, - { 11, 0x7fau }, - { 6, 0x22u }, - { 6, 0x23u }, - { 6, 0x24u }, - { 7, 0x6bu }, - { 4, 0x1u }, - { 4, 0x2u }, - { 4, 0x3u }, - { 5, 0x8u }, - { 5, 0x9u }, - { 5, 0xau }, - { 6, 0x25u }, - { 6, 0x26u }, - { 5, 0xbu }, - { 5, 0xcu }, - { 5, 0xdu }, - { 9, 0x1efu }, - { 16, 0xfffau }, - { 7, 0x6cu }, - { 13, 0x1ffcu }, - { 12, 0xffcu }, - { 16, 0xfffbu }, - { 7, 0x6du }, - { 8, 0xeau }, - { 8, 0xebu }, - { 8, 0xecu }, - { 8, 0xedu }, - { 8, 0xeeu }, - { 6, 0x27u }, - { 9, 0x1f0u }, - { 8, 0xefu }, - { 8, 0xf0u }, - { 10, 0x3f9u }, - { 9, 0x1f1u }, - { 6, 0x28u }, - { 8, 0xf1u }, - { 8, 0xf2u }, - { 9, 0x1f2u }, - { 10, 0x3fau }, - { 9, 0x1f3u }, - { 6, 0x29u }, - { 5, 0xeu }, - { 9, 0x1f4u }, - { 9, 0x1f5u }, - { 8, 0xf3u }, - { 10, 0x3fbu }, - { 9, 0x1f6u }, - { 10, 0x3fcu }, - { 11, 0x7fbu }, - { 13, 0x1ffdu }, - { 11, 0x7fcu }, - { 15, 0x7ffcu }, - { 9, 0x1f7u }, - { 17, 0x1fffeu }, - { 5, 0xfu }, - { 7, 0x6eu }, - { 6, 0x2au }, - { 6, 0x2bu }, - { 5, 0x10u }, - { 7, 0x6fu }, - { 7, 0x70u }, - { 7, 0x71u }, - { 6, 0x2cu }, - { 9, 0x1f8u }, - { 9, 0x1f9u }, - { 7, 0x72u }, - { 6, 0x2du }, - { 6, 0x2eu }, - { 6, 0x2fu }, - { 6, 0x30u }, - { 9, 0x1fau }, - { 6, 0x31u }, - { 6, 0x32u }, - { 6, 0x33u }, - { 6, 0x34u }, - { 7, 0x73u }, - { 8, 0xf4u }, - { 7, 0x74u }, - { 8, 0xf5u }, - { 9, 0x1fbu }, - { 16, 0xfffcu }, - { 14, 0x3ffdu }, - { 16, 0xfffdu }, - { 16, 0xfffeu }, - { 25, 0x1ffffdcu }, - { 25, 0x1ffffddu }, - { 25, 0x1ffffdeu }, - { 25, 0x1ffffdfu }, - { 25, 0x1ffffe0u }, - { 25, 0x1ffffe1u }, - { 25, 0x1ffffe2u }, - { 25, 0x1ffffe3u }, - { 25, 0x1ffffe4u }, - { 25, 0x1ffffe5u }, - { 25, 0x1ffffe6u }, - { 25, 0x1ffffe7u }, - { 25, 0x1ffffe8u }, - { 25, 0x1ffffe9u }, - { 25, 0x1ffffeau }, - { 25, 0x1ffffebu }, - { 25, 0x1ffffecu }, - { 25, 0x1ffffedu }, - { 25, 0x1ffffeeu }, - { 25, 0x1ffffefu }, - { 25, 0x1fffff0u }, - { 25, 0x1fffff1u }, - { 25, 0x1fffff2u }, - { 25, 0x1fffff3u }, - { 25, 0x1fffff4u }, - { 25, 0x1fffff5u }, - { 25, 0x1fffff6u }, - { 25, 0x1fffff7u }, - { 25, 0x1fffff8u }, - { 25, 0x1fffff9u }, - { 25, 0x1fffffau }, - { 25, 0x1fffffbu }, - { 25, 0x1fffffcu }, - { 25, 0x1fffffdu }, - { 25, 0x1fffffeu }, - { 25, 0x1ffffffu }, - { 24, 0xffff80u }, - { 24, 0xffff81u }, - { 24, 0xffff82u }, - { 24, 0xffff83u }, - { 24, 0xffff84u }, - { 24, 0xffff85u }, - { 24, 0xffff86u }, - { 24, 0xffff87u }, - { 24, 0xffff88u }, - { 24, 0xffff89u }, - { 24, 0xffff8au }, - { 24, 0xffff8bu }, - { 24, 0xffff8cu }, - { 24, 0xffff8du }, - { 24, 0xffff8eu }, - { 24, 0xffff8fu }, - { 24, 0xffff90u }, - { 24, 0xffff91u }, - { 24, 0xffff92u }, - { 24, 0xffff93u }, - { 24, 0xffff94u }, - { 24, 0xffff95u }, - { 24, 0xffff96u }, - { 24, 0xffff97u }, - { 24, 0xffff98u }, - { 24, 0xffff99u }, - { 24, 0xffff9au }, - { 24, 0xffff9bu }, - { 24, 0xffff9cu }, - { 24, 0xffff9du }, - { 24, 0xffff9eu }, - { 24, 0xffff9fu }, - { 24, 0xffffa0u }, - { 24, 0xffffa1u }, - { 24, 0xffffa2u }, - { 24, 0xffffa3u }, - { 24, 0xffffa4u }, - { 24, 0xffffa5u }, - { 24, 0xffffa6u }, - { 24, 0xffffa7u }, - { 24, 0xffffa8u }, - { 24, 0xffffa9u }, - { 24, 0xffffaau }, - { 24, 0xffffabu }, - { 24, 0xffffacu }, - { 24, 0xffffadu }, - { 24, 0xffffaeu }, - { 24, 0xffffafu }, - { 24, 0xffffb0u }, - { 24, 0xffffb1u }, - { 24, 0xffffb2u }, - { 24, 0xffffb3u }, - { 24, 0xffffb4u }, - { 24, 0xffffb5u }, - { 24, 0xffffb6u }, - { 24, 0xffffb7u }, - { 24, 0xffffb8u }, - { 24, 0xffffb9u }, - { 24, 0xffffbau }, - { 24, 0xffffbbu }, - { 24, 0xffffbcu }, - { 24, 0xffffbdu }, - { 24, 0xffffbeu }, - { 24, 0xffffbfu }, - { 24, 0xffffc0u }, - { 24, 0xffffc1u }, - { 24, 0xffffc2u }, - { 24, 0xffffc3u }, - { 24, 0xffffc4u }, - { 24, 0xffffc5u }, - { 24, 0xffffc6u }, - { 24, 0xffffc7u }, - { 24, 0xffffc8u }, - { 24, 0xffffc9u }, - { 24, 0xffffcau }, - { 24, 0xffffcbu }, - { 24, 0xffffccu }, - { 24, 0xffffcdu }, - { 24, 0xffffceu }, - { 24, 0xffffcfu }, - { 24, 0xffffd0u }, - { 24, 0xffffd1u }, - { 24, 0xffffd2u }, - { 24, 0xffffd3u }, - { 24, 0xffffd4u }, - { 24, 0xffffd5u }, - { 24, 0xffffd6u }, - { 24, 0xffffd7u }, - { 24, 0xffffd8u }, - { 24, 0xffffd9u }, - { 24, 0xffffdau }, - { 24, 0xffffdbu }, - { 24, 0xffffdcu }, - { 24, 0xffffddu } -}; - -const nghttp2_huff_decode req_huff_decode_table[][16] = { +const nghttp2_huff_decode huff_decode_table[][16] = { /* 0 */ { {0, 0x03, 47}, @@ -5410,4870 +5150,3 @@ const nghttp2_huff_decode req_huff_decode_table[][16] = { {37, 0x03, 163}, }, }; - -const nghttp2_huff_decode res_huff_decode_table[][16] = { -/* 0 */ -{ - {0, 0x03, 32}, - {0, 0x03, 48}, - {0, 0x03, 49}, - {0, 0x03, 50}, - {7, 0x00, 0}, - {8, 0x00, 0}, - {10, 0x00, 0}, - {11, 0x00, 0}, - {15, 0x00, 0}, - {17, 0x00, 0}, - {21, 0x00, 0}, - {24, 0x00, 0}, - {29, 0x00, 0}, - {32, 0x00, 0}, - {39, 0x00, 0}, - {49, 0x01, 0}, -}, -/* 1 */ -{ - {1, 0x02, 32}, - {12, 0x03, 32}, - {1, 0x02, 48}, - {12, 0x03, 48}, - {1, 0x02, 49}, - {12, 0x03, 49}, - {1, 0x02, 50}, - {12, 0x03, 50}, - {0, 0x03, 51}, - {0, 0x03, 52}, - {0, 0x03, 53}, - {0, 0x03, 56}, - {0, 0x03, 57}, - {0, 0x03, 58}, - {0, 0x03, 84}, - {0, 0x03, 97}, -}, -/* 2 */ -{ - {2, 0x02, 32}, - {5, 0x02, 32}, - {13, 0x02, 32}, - {27, 0x03, 32}, - {2, 0x02, 48}, - {5, 0x02, 48}, - {13, 0x02, 48}, - {27, 0x03, 48}, - {2, 0x02, 49}, - {5, 0x02, 49}, - {13, 0x02, 49}, - {27, 0x03, 49}, - {2, 0x02, 50}, - {5, 0x02, 50}, - {13, 0x02, 50}, - {27, 0x03, 50}, -}, -/* 3 */ -{ - {3, 0x02, 32}, - {4, 0x02, 32}, - {6, 0x02, 32}, - {9, 0x02, 32}, - {14, 0x02, 32}, - {20, 0x02, 32}, - {28, 0x02, 32}, - {38, 0x03, 32}, - {3, 0x02, 48}, - {4, 0x02, 48}, - {6, 0x02, 48}, - {9, 0x02, 48}, - {14, 0x02, 48}, - {20, 0x02, 48}, - {28, 0x02, 48}, - {38, 0x03, 48}, -}, -/* 4 */ -{ - {3, 0x02, 49}, - {4, 0x02, 49}, - {6, 0x02, 49}, - {9, 0x02, 49}, - {14, 0x02, 49}, - {20, 0x02, 49}, - {28, 0x02, 49}, - {38, 0x03, 49}, - {3, 0x02, 50}, - {4, 0x02, 50}, - {6, 0x02, 50}, - {9, 0x02, 50}, - {14, 0x02, 50}, - {20, 0x02, 50}, - {28, 0x02, 50}, - {38, 0x03, 50}, -}, -/* 5 */ -{ - {1, 0x02, 51}, - {12, 0x03, 51}, - {1, 0x02, 52}, - {12, 0x03, 52}, - {1, 0x02, 53}, - {12, 0x03, 53}, - {1, 0x02, 56}, - {12, 0x03, 56}, - {1, 0x02, 57}, - {12, 0x03, 57}, - {1, 0x02, 58}, - {12, 0x03, 58}, - {1, 0x02, 84}, - {12, 0x03, 84}, - {1, 0x02, 97}, - {12, 0x03, 97}, -}, -/* 6 */ -{ - {2, 0x02, 51}, - {5, 0x02, 51}, - {13, 0x02, 51}, - {27, 0x03, 51}, - {2, 0x02, 52}, - {5, 0x02, 52}, - {13, 0x02, 52}, - {27, 0x03, 52}, - {2, 0x02, 53}, - {5, 0x02, 53}, - {13, 0x02, 53}, - {27, 0x03, 53}, - {2, 0x02, 56}, - {5, 0x02, 56}, - {13, 0x02, 56}, - {27, 0x03, 56}, -}, -/* 7 */ -{ - {3, 0x02, 51}, - {4, 0x02, 51}, - {6, 0x02, 51}, - {9, 0x02, 51}, - {14, 0x02, 51}, - {20, 0x02, 51}, - {28, 0x02, 51}, - {38, 0x03, 51}, - {3, 0x02, 52}, - {4, 0x02, 52}, - {6, 0x02, 52}, - {9, 0x02, 52}, - {14, 0x02, 52}, - {20, 0x02, 52}, - {28, 0x02, 52}, - {38, 0x03, 52}, -}, -/* 8 */ -{ - {3, 0x02, 53}, - {4, 0x02, 53}, - {6, 0x02, 53}, - {9, 0x02, 53}, - {14, 0x02, 53}, - {20, 0x02, 53}, - {28, 0x02, 53}, - {38, 0x03, 53}, - {3, 0x02, 56}, - {4, 0x02, 56}, - {6, 0x02, 56}, - {9, 0x02, 56}, - {14, 0x02, 56}, - {20, 0x02, 56}, - {28, 0x02, 56}, - {38, 0x03, 56}, -}, -/* 9 */ -{ - {2, 0x02, 57}, - {5, 0x02, 57}, - {13, 0x02, 57}, - {27, 0x03, 57}, - {2, 0x02, 58}, - {5, 0x02, 58}, - {13, 0x02, 58}, - {27, 0x03, 58}, - {2, 0x02, 84}, - {5, 0x02, 84}, - {13, 0x02, 84}, - {27, 0x03, 84}, - {2, 0x02, 97}, - {5, 0x02, 97}, - {13, 0x02, 97}, - {27, 0x03, 97}, -}, -/* 10 */ -{ - {3, 0x02, 57}, - {4, 0x02, 57}, - {6, 0x02, 57}, - {9, 0x02, 57}, - {14, 0x02, 57}, - {20, 0x02, 57}, - {28, 0x02, 57}, - {38, 0x03, 57}, - {3, 0x02, 58}, - {4, 0x02, 58}, - {6, 0x02, 58}, - {9, 0x02, 58}, - {14, 0x02, 58}, - {20, 0x02, 58}, - {28, 0x02, 58}, - {38, 0x03, 58}, -}, -/* 11 */ -{ - {3, 0x02, 84}, - {4, 0x02, 84}, - {6, 0x02, 84}, - {9, 0x02, 84}, - {14, 0x02, 84}, - {20, 0x02, 84}, - {28, 0x02, 84}, - {38, 0x03, 84}, - {3, 0x02, 97}, - {4, 0x02, 97}, - {6, 0x02, 97}, - {9, 0x02, 97}, - {14, 0x02, 97}, - {20, 0x02, 97}, - {28, 0x02, 97}, - {38, 0x03, 97}, -}, -/* 12 */ -{ - {0, 0x03, 101}, - {16, 0x00, 0}, - {18, 0x00, 0}, - {19, 0x00, 0}, - {22, 0x00, 0}, - {23, 0x00, 0}, - {25, 0x00, 0}, - {26, 0x00, 0}, - {30, 0x00, 0}, - {31, 0x00, 0}, - {33, 0x00, 0}, - {35, 0x00, 0}, - {40, 0x00, 0}, - {43, 0x00, 0}, - {50, 0x00, 0}, - {59, 0x01, 0}, -}, -/* 13 */ -{ - {1, 0x02, 101}, - {12, 0x03, 101}, - {0, 0x03, 44}, - {0, 0x03, 45}, - {0, 0x03, 46}, - {0, 0x03, 54}, - {0, 0x03, 55}, - {0, 0x03, 71}, - {0, 0x03, 77}, - {0, 0x03, 83}, - {0, 0x03, 99}, - {0, 0x03, 100}, - {0, 0x03, 105}, - {0, 0x03, 109}, - {0, 0x03, 110}, - {0, 0x03, 111}, -}, -/* 14 */ -{ - {2, 0x02, 101}, - {5, 0x02, 101}, - {13, 0x02, 101}, - {27, 0x03, 101}, - {1, 0x02, 44}, - {12, 0x03, 44}, - {1, 0x02, 45}, - {12, 0x03, 45}, - {1, 0x02, 46}, - {12, 0x03, 46}, - {1, 0x02, 54}, - {12, 0x03, 54}, - {1, 0x02, 55}, - {12, 0x03, 55}, - {1, 0x02, 71}, - {12, 0x03, 71}, -}, -/* 15 */ -{ - {3, 0x02, 101}, - {4, 0x02, 101}, - {6, 0x02, 101}, - {9, 0x02, 101}, - {14, 0x02, 101}, - {20, 0x02, 101}, - {28, 0x02, 101}, - {38, 0x03, 101}, - {2, 0x02, 44}, - {5, 0x02, 44}, - {13, 0x02, 44}, - {27, 0x03, 44}, - {2, 0x02, 45}, - {5, 0x02, 45}, - {13, 0x02, 45}, - {27, 0x03, 45}, -}, -/* 16 */ -{ - {3, 0x02, 44}, - {4, 0x02, 44}, - {6, 0x02, 44}, - {9, 0x02, 44}, - {14, 0x02, 44}, - {20, 0x02, 44}, - {28, 0x02, 44}, - {38, 0x03, 44}, - {3, 0x02, 45}, - {4, 0x02, 45}, - {6, 0x02, 45}, - {9, 0x02, 45}, - {14, 0x02, 45}, - {20, 0x02, 45}, - {28, 0x02, 45}, - {38, 0x03, 45}, -}, -/* 17 */ -{ - {2, 0x02, 46}, - {5, 0x02, 46}, - {13, 0x02, 46}, - {27, 0x03, 46}, - {2, 0x02, 54}, - {5, 0x02, 54}, - {13, 0x02, 54}, - {27, 0x03, 54}, - {2, 0x02, 55}, - {5, 0x02, 55}, - {13, 0x02, 55}, - {27, 0x03, 55}, - {2, 0x02, 71}, - {5, 0x02, 71}, - {13, 0x02, 71}, - {27, 0x03, 71}, -}, -/* 18 */ -{ - {3, 0x02, 46}, - {4, 0x02, 46}, - {6, 0x02, 46}, - {9, 0x02, 46}, - {14, 0x02, 46}, - {20, 0x02, 46}, - {28, 0x02, 46}, - {38, 0x03, 46}, - {3, 0x02, 54}, - {4, 0x02, 54}, - {6, 0x02, 54}, - {9, 0x02, 54}, - {14, 0x02, 54}, - {20, 0x02, 54}, - {28, 0x02, 54}, - {38, 0x03, 54}, -}, -/* 19 */ -{ - {3, 0x02, 55}, - {4, 0x02, 55}, - {6, 0x02, 55}, - {9, 0x02, 55}, - {14, 0x02, 55}, - {20, 0x02, 55}, - {28, 0x02, 55}, - {38, 0x03, 55}, - {3, 0x02, 71}, - {4, 0x02, 71}, - {6, 0x02, 71}, - {9, 0x02, 71}, - {14, 0x02, 71}, - {20, 0x02, 71}, - {28, 0x02, 71}, - {38, 0x03, 71}, -}, -/* 20 */ -{ - {1, 0x02, 77}, - {12, 0x03, 77}, - {1, 0x02, 83}, - {12, 0x03, 83}, - {1, 0x02, 99}, - {12, 0x03, 99}, - {1, 0x02, 100}, - {12, 0x03, 100}, - {1, 0x02, 105}, - {12, 0x03, 105}, - {1, 0x02, 109}, - {12, 0x03, 109}, - {1, 0x02, 110}, - {12, 0x03, 110}, - {1, 0x02, 111}, - {12, 0x03, 111}, -}, -/* 21 */ -{ - {2, 0x02, 77}, - {5, 0x02, 77}, - {13, 0x02, 77}, - {27, 0x03, 77}, - {2, 0x02, 83}, - {5, 0x02, 83}, - {13, 0x02, 83}, - {27, 0x03, 83}, - {2, 0x02, 99}, - {5, 0x02, 99}, - {13, 0x02, 99}, - {27, 0x03, 99}, - {2, 0x02, 100}, - {5, 0x02, 100}, - {13, 0x02, 100}, - {27, 0x03, 100}, -}, -/* 22 */ -{ - {3, 0x02, 77}, - {4, 0x02, 77}, - {6, 0x02, 77}, - {9, 0x02, 77}, - {14, 0x02, 77}, - {20, 0x02, 77}, - {28, 0x02, 77}, - {38, 0x03, 77}, - {3, 0x02, 83}, - {4, 0x02, 83}, - {6, 0x02, 83}, - {9, 0x02, 83}, - {14, 0x02, 83}, - {20, 0x02, 83}, - {28, 0x02, 83}, - {38, 0x03, 83}, -}, -/* 23 */ -{ - {3, 0x02, 99}, - {4, 0x02, 99}, - {6, 0x02, 99}, - {9, 0x02, 99}, - {14, 0x02, 99}, - {20, 0x02, 99}, - {28, 0x02, 99}, - {38, 0x03, 99}, - {3, 0x02, 100}, - {4, 0x02, 100}, - {6, 0x02, 100}, - {9, 0x02, 100}, - {14, 0x02, 100}, - {20, 0x02, 100}, - {28, 0x02, 100}, - {38, 0x03, 100}, -}, -/* 24 */ -{ - {2, 0x02, 105}, - {5, 0x02, 105}, - {13, 0x02, 105}, - {27, 0x03, 105}, - {2, 0x02, 109}, - {5, 0x02, 109}, - {13, 0x02, 109}, - {27, 0x03, 109}, - {2, 0x02, 110}, - {5, 0x02, 110}, - {13, 0x02, 110}, - {27, 0x03, 110}, - {2, 0x02, 111}, - {5, 0x02, 111}, - {13, 0x02, 111}, - {27, 0x03, 111}, -}, -/* 25 */ -{ - {3, 0x02, 105}, - {4, 0x02, 105}, - {6, 0x02, 105}, - {9, 0x02, 105}, - {14, 0x02, 105}, - {20, 0x02, 105}, - {28, 0x02, 105}, - {38, 0x03, 105}, - {3, 0x02, 109}, - {4, 0x02, 109}, - {6, 0x02, 109}, - {9, 0x02, 109}, - {14, 0x02, 109}, - {20, 0x02, 109}, - {28, 0x02, 109}, - {38, 0x03, 109}, -}, -/* 26 */ -{ - {3, 0x02, 110}, - {4, 0x02, 110}, - {6, 0x02, 110}, - {9, 0x02, 110}, - {14, 0x02, 110}, - {20, 0x02, 110}, - {28, 0x02, 110}, - {38, 0x03, 110}, - {3, 0x02, 111}, - {4, 0x02, 111}, - {6, 0x02, 111}, - {9, 0x02, 111}, - {14, 0x02, 111}, - {20, 0x02, 111}, - {28, 0x02, 111}, - {38, 0x03, 111}, -}, -/* 27 */ -{ - {0, 0x03, 112}, - {0, 0x03, 114}, - {0, 0x03, 115}, - {0, 0x03, 116}, - {0, 0x03, 117}, - {34, 0x00, 0}, - {36, 0x00, 0}, - {37, 0x00, 0}, - {41, 0x00, 0}, - {42, 0x00, 0}, - {44, 0x00, 0}, - {46, 0x00, 0}, - {51, 0x00, 0}, - {54, 0x00, 0}, - {60, 0x00, 0}, - {67, 0x01, 0}, -}, -/* 28 */ -{ - {1, 0x02, 112}, - {12, 0x03, 112}, - {1, 0x02, 114}, - {12, 0x03, 114}, - {1, 0x02, 115}, - {12, 0x03, 115}, - {1, 0x02, 116}, - {12, 0x03, 116}, - {1, 0x02, 117}, - {12, 0x03, 117}, - {0, 0x03, 34}, - {0, 0x03, 47}, - {0, 0x03, 61}, - {0, 0x03, 65}, - {0, 0x03, 98}, - {0, 0x03, 102}, -}, -/* 29 */ -{ - {2, 0x02, 112}, - {5, 0x02, 112}, - {13, 0x02, 112}, - {27, 0x03, 112}, - {2, 0x02, 114}, - {5, 0x02, 114}, - {13, 0x02, 114}, - {27, 0x03, 114}, - {2, 0x02, 115}, - {5, 0x02, 115}, - {13, 0x02, 115}, - {27, 0x03, 115}, - {2, 0x02, 116}, - {5, 0x02, 116}, - {13, 0x02, 116}, - {27, 0x03, 116}, -}, -/* 30 */ -{ - {3, 0x02, 112}, - {4, 0x02, 112}, - {6, 0x02, 112}, - {9, 0x02, 112}, - {14, 0x02, 112}, - {20, 0x02, 112}, - {28, 0x02, 112}, - {38, 0x03, 112}, - {3, 0x02, 114}, - {4, 0x02, 114}, - {6, 0x02, 114}, - {9, 0x02, 114}, - {14, 0x02, 114}, - {20, 0x02, 114}, - {28, 0x02, 114}, - {38, 0x03, 114}, -}, -/* 31 */ -{ - {3, 0x02, 115}, - {4, 0x02, 115}, - {6, 0x02, 115}, - {9, 0x02, 115}, - {14, 0x02, 115}, - {20, 0x02, 115}, - {28, 0x02, 115}, - {38, 0x03, 115}, - {3, 0x02, 116}, - {4, 0x02, 116}, - {6, 0x02, 116}, - {9, 0x02, 116}, - {14, 0x02, 116}, - {20, 0x02, 116}, - {28, 0x02, 116}, - {38, 0x03, 116}, -}, -/* 32 */ -{ - {2, 0x02, 117}, - {5, 0x02, 117}, - {13, 0x02, 117}, - {27, 0x03, 117}, - {1, 0x02, 34}, - {12, 0x03, 34}, - {1, 0x02, 47}, - {12, 0x03, 47}, - {1, 0x02, 61}, - {12, 0x03, 61}, - {1, 0x02, 65}, - {12, 0x03, 65}, - {1, 0x02, 98}, - {12, 0x03, 98}, - {1, 0x02, 102}, - {12, 0x03, 102}, -}, -/* 33 */ -{ - {3, 0x02, 117}, - {4, 0x02, 117}, - {6, 0x02, 117}, - {9, 0x02, 117}, - {14, 0x02, 117}, - {20, 0x02, 117}, - {28, 0x02, 117}, - {38, 0x03, 117}, - {2, 0x02, 34}, - {5, 0x02, 34}, - {13, 0x02, 34}, - {27, 0x03, 34}, - {2, 0x02, 47}, - {5, 0x02, 47}, - {13, 0x02, 47}, - {27, 0x03, 47}, -}, -/* 34 */ -{ - {3, 0x02, 34}, - {4, 0x02, 34}, - {6, 0x02, 34}, - {9, 0x02, 34}, - {14, 0x02, 34}, - {20, 0x02, 34}, - {28, 0x02, 34}, - {38, 0x03, 34}, - {3, 0x02, 47}, - {4, 0x02, 47}, - {6, 0x02, 47}, - {9, 0x02, 47}, - {14, 0x02, 47}, - {20, 0x02, 47}, - {28, 0x02, 47}, - {38, 0x03, 47}, -}, -/* 35 */ -{ - {2, 0x02, 61}, - {5, 0x02, 61}, - {13, 0x02, 61}, - {27, 0x03, 61}, - {2, 0x02, 65}, - {5, 0x02, 65}, - {13, 0x02, 65}, - {27, 0x03, 65}, - {2, 0x02, 98}, - {5, 0x02, 98}, - {13, 0x02, 98}, - {27, 0x03, 98}, - {2, 0x02, 102}, - {5, 0x02, 102}, - {13, 0x02, 102}, - {27, 0x03, 102}, -}, -/* 36 */ -{ - {3, 0x02, 61}, - {4, 0x02, 61}, - {6, 0x02, 61}, - {9, 0x02, 61}, - {14, 0x02, 61}, - {20, 0x02, 61}, - {28, 0x02, 61}, - {38, 0x03, 61}, - {3, 0x02, 65}, - {4, 0x02, 65}, - {6, 0x02, 65}, - {9, 0x02, 65}, - {14, 0x02, 65}, - {20, 0x02, 65}, - {28, 0x02, 65}, - {38, 0x03, 65}, -}, -/* 37 */ -{ - {3, 0x02, 98}, - {4, 0x02, 98}, - {6, 0x02, 98}, - {9, 0x02, 98}, - {14, 0x02, 98}, - {20, 0x02, 98}, - {28, 0x02, 98}, - {38, 0x03, 98}, - {3, 0x02, 102}, - {4, 0x02, 102}, - {6, 0x02, 102}, - {9, 0x02, 102}, - {14, 0x02, 102}, - {20, 0x02, 102}, - {28, 0x02, 102}, - {38, 0x03, 102}, -}, -/* 38 */ -{ - {0, 0x03, 103}, - {0, 0x03, 104}, - {0, 0x03, 108}, - {0, 0x03, 118}, - {0, 0x03, 120}, - {45, 0x00, 0}, - {47, 0x00, 0}, - {48, 0x00, 0}, - {52, 0x00, 0}, - {53, 0x00, 0}, - {55, 0x00, 0}, - {56, 0x00, 0}, - {61, 0x00, 0}, - {64, 0x00, 0}, - {68, 0x00, 0}, - {71, 0x01, 0}, -}, -/* 39 */ -{ - {1, 0x02, 103}, - {12, 0x03, 103}, - {1, 0x02, 104}, - {12, 0x03, 104}, - {1, 0x02, 108}, - {12, 0x03, 108}, - {1, 0x02, 118}, - {12, 0x03, 118}, - {1, 0x02, 120}, - {12, 0x03, 120}, - {0, 0x03, 66}, - {0, 0x03, 67}, - {0, 0x03, 68}, - {0, 0x03, 69}, - {0, 0x03, 70}, - {0, 0x03, 73}, -}, -/* 40 */ -{ - {2, 0x02, 103}, - {5, 0x02, 103}, - {13, 0x02, 103}, - {27, 0x03, 103}, - {2, 0x02, 104}, - {5, 0x02, 104}, - {13, 0x02, 104}, - {27, 0x03, 104}, - {2, 0x02, 108}, - {5, 0x02, 108}, - {13, 0x02, 108}, - {27, 0x03, 108}, - {2, 0x02, 118}, - {5, 0x02, 118}, - {13, 0x02, 118}, - {27, 0x03, 118}, -}, -/* 41 */ -{ - {3, 0x02, 103}, - {4, 0x02, 103}, - {6, 0x02, 103}, - {9, 0x02, 103}, - {14, 0x02, 103}, - {20, 0x02, 103}, - {28, 0x02, 103}, - {38, 0x03, 103}, - {3, 0x02, 104}, - {4, 0x02, 104}, - {6, 0x02, 104}, - {9, 0x02, 104}, - {14, 0x02, 104}, - {20, 0x02, 104}, - {28, 0x02, 104}, - {38, 0x03, 104}, -}, -/* 42 */ -{ - {3, 0x02, 108}, - {4, 0x02, 108}, - {6, 0x02, 108}, - {9, 0x02, 108}, - {14, 0x02, 108}, - {20, 0x02, 108}, - {28, 0x02, 108}, - {38, 0x03, 108}, - {3, 0x02, 118}, - {4, 0x02, 118}, - {6, 0x02, 118}, - {9, 0x02, 118}, - {14, 0x02, 118}, - {20, 0x02, 118}, - {28, 0x02, 118}, - {38, 0x03, 118}, -}, -/* 43 */ -{ - {2, 0x02, 120}, - {5, 0x02, 120}, - {13, 0x02, 120}, - {27, 0x03, 120}, - {1, 0x02, 66}, - {12, 0x03, 66}, - {1, 0x02, 67}, - {12, 0x03, 67}, - {1, 0x02, 68}, - {12, 0x03, 68}, - {1, 0x02, 69}, - {12, 0x03, 69}, - {1, 0x02, 70}, - {12, 0x03, 70}, - {1, 0x02, 73}, - {12, 0x03, 73}, -}, -/* 44 */ -{ - {3, 0x02, 120}, - {4, 0x02, 120}, - {6, 0x02, 120}, - {9, 0x02, 120}, - {14, 0x02, 120}, - {20, 0x02, 120}, - {28, 0x02, 120}, - {38, 0x03, 120}, - {2, 0x02, 66}, - {5, 0x02, 66}, - {13, 0x02, 66}, - {27, 0x03, 66}, - {2, 0x02, 67}, - {5, 0x02, 67}, - {13, 0x02, 67}, - {27, 0x03, 67}, -}, -/* 45 */ -{ - {3, 0x02, 66}, - {4, 0x02, 66}, - {6, 0x02, 66}, - {9, 0x02, 66}, - {14, 0x02, 66}, - {20, 0x02, 66}, - {28, 0x02, 66}, - {38, 0x03, 66}, - {3, 0x02, 67}, - {4, 0x02, 67}, - {6, 0x02, 67}, - {9, 0x02, 67}, - {14, 0x02, 67}, - {20, 0x02, 67}, - {28, 0x02, 67}, - {38, 0x03, 67}, -}, -/* 46 */ -{ - {2, 0x02, 68}, - {5, 0x02, 68}, - {13, 0x02, 68}, - {27, 0x03, 68}, - {2, 0x02, 69}, - {5, 0x02, 69}, - {13, 0x02, 69}, - {27, 0x03, 69}, - {2, 0x02, 70}, - {5, 0x02, 70}, - {13, 0x02, 70}, - {27, 0x03, 70}, - {2, 0x02, 73}, - {5, 0x02, 73}, - {13, 0x02, 73}, - {27, 0x03, 73}, -}, -/* 47 */ -{ - {3, 0x02, 68}, - {4, 0x02, 68}, - {6, 0x02, 68}, - {9, 0x02, 68}, - {14, 0x02, 68}, - {20, 0x02, 68}, - {28, 0x02, 68}, - {38, 0x03, 68}, - {3, 0x02, 69}, - {4, 0x02, 69}, - {6, 0x02, 69}, - {9, 0x02, 69}, - {14, 0x02, 69}, - {20, 0x02, 69}, - {28, 0x02, 69}, - {38, 0x03, 69}, -}, -/* 48 */ -{ - {3, 0x02, 70}, - {4, 0x02, 70}, - {6, 0x02, 70}, - {9, 0x02, 70}, - {14, 0x02, 70}, - {20, 0x02, 70}, - {28, 0x02, 70}, - {38, 0x03, 70}, - {3, 0x02, 73}, - {4, 0x02, 73}, - {6, 0x02, 73}, - {9, 0x02, 73}, - {14, 0x02, 73}, - {20, 0x02, 73}, - {28, 0x02, 73}, - {38, 0x03, 73}, -}, -/* 49 */ -{ - {0, 0x03, 74}, - {0, 0x03, 78}, - {0, 0x03, 79}, - {0, 0x03, 87}, - {0, 0x03, 119}, - {0, 0x03, 121}, - {57, 0x00, 0}, - {58, 0x00, 0}, - {62, 0x00, 0}, - {63, 0x00, 0}, - {65, 0x00, 0}, - {66, 0x00, 0}, - {69, 0x00, 0}, - {70, 0x00, 0}, - {72, 0x00, 0}, - {75, 0x00, 0}, -}, -/* 50 */ -{ - {1, 0x02, 74}, - {12, 0x03, 74}, - {1, 0x02, 78}, - {12, 0x03, 78}, - {1, 0x02, 79}, - {12, 0x03, 79}, - {1, 0x02, 87}, - {12, 0x03, 87}, - {1, 0x02, 119}, - {12, 0x03, 119}, - {1, 0x02, 121}, - {12, 0x03, 121}, - {0, 0x03, 37}, - {0, 0x03, 40}, - {0, 0x03, 41}, - {0, 0x03, 59}, -}, -/* 51 */ -{ - {2, 0x02, 74}, - {5, 0x02, 74}, - {13, 0x02, 74}, - {27, 0x03, 74}, - {2, 0x02, 78}, - {5, 0x02, 78}, - {13, 0x02, 78}, - {27, 0x03, 78}, - {2, 0x02, 79}, - {5, 0x02, 79}, - {13, 0x02, 79}, - {27, 0x03, 79}, - {2, 0x02, 87}, - {5, 0x02, 87}, - {13, 0x02, 87}, - {27, 0x03, 87}, -}, -/* 52 */ -{ - {3, 0x02, 74}, - {4, 0x02, 74}, - {6, 0x02, 74}, - {9, 0x02, 74}, - {14, 0x02, 74}, - {20, 0x02, 74}, - {28, 0x02, 74}, - {38, 0x03, 74}, - {3, 0x02, 78}, - {4, 0x02, 78}, - {6, 0x02, 78}, - {9, 0x02, 78}, - {14, 0x02, 78}, - {20, 0x02, 78}, - {28, 0x02, 78}, - {38, 0x03, 78}, -}, -/* 53 */ -{ - {3, 0x02, 79}, - {4, 0x02, 79}, - {6, 0x02, 79}, - {9, 0x02, 79}, - {14, 0x02, 79}, - {20, 0x02, 79}, - {28, 0x02, 79}, - {38, 0x03, 79}, - {3, 0x02, 87}, - {4, 0x02, 87}, - {6, 0x02, 87}, - {9, 0x02, 87}, - {14, 0x02, 87}, - {20, 0x02, 87}, - {28, 0x02, 87}, - {38, 0x03, 87}, -}, -/* 54 */ -{ - {2, 0x02, 119}, - {5, 0x02, 119}, - {13, 0x02, 119}, - {27, 0x03, 119}, - {2, 0x02, 121}, - {5, 0x02, 121}, - {13, 0x02, 121}, - {27, 0x03, 121}, - {1, 0x02, 37}, - {12, 0x03, 37}, - {1, 0x02, 40}, - {12, 0x03, 40}, - {1, 0x02, 41}, - {12, 0x03, 41}, - {1, 0x02, 59}, - {12, 0x03, 59}, -}, -/* 55 */ -{ - {3, 0x02, 119}, - {4, 0x02, 119}, - {6, 0x02, 119}, - {9, 0x02, 119}, - {14, 0x02, 119}, - {20, 0x02, 119}, - {28, 0x02, 119}, - {38, 0x03, 119}, - {3, 0x02, 121}, - {4, 0x02, 121}, - {6, 0x02, 121}, - {9, 0x02, 121}, - {14, 0x02, 121}, - {20, 0x02, 121}, - {28, 0x02, 121}, - {38, 0x03, 121}, -}, -/* 56 */ -{ - {2, 0x02, 37}, - {5, 0x02, 37}, - {13, 0x02, 37}, - {27, 0x03, 37}, - {2, 0x02, 40}, - {5, 0x02, 40}, - {13, 0x02, 40}, - {27, 0x03, 40}, - {2, 0x02, 41}, - {5, 0x02, 41}, - {13, 0x02, 41}, - {27, 0x03, 41}, - {2, 0x02, 59}, - {5, 0x02, 59}, - {13, 0x02, 59}, - {27, 0x03, 59}, -}, -/* 57 */ -{ - {3, 0x02, 37}, - {4, 0x02, 37}, - {6, 0x02, 37}, - {9, 0x02, 37}, - {14, 0x02, 37}, - {20, 0x02, 37}, - {28, 0x02, 37}, - {38, 0x03, 37}, - {3, 0x02, 40}, - {4, 0x02, 40}, - {6, 0x02, 40}, - {9, 0x02, 40}, - {14, 0x02, 40}, - {20, 0x02, 40}, - {28, 0x02, 40}, - {38, 0x03, 40}, -}, -/* 58 */ -{ - {3, 0x02, 41}, - {4, 0x02, 41}, - {6, 0x02, 41}, - {9, 0x02, 41}, - {14, 0x02, 41}, - {20, 0x02, 41}, - {28, 0x02, 41}, - {38, 0x03, 41}, - {3, 0x02, 59}, - {4, 0x02, 59}, - {6, 0x02, 59}, - {9, 0x02, 59}, - {14, 0x02, 59}, - {20, 0x02, 59}, - {28, 0x02, 59}, - {38, 0x03, 59}, -}, -/* 59 */ -{ - {0, 0x03, 72}, - {0, 0x03, 76}, - {0, 0x03, 80}, - {0, 0x03, 82}, - {0, 0x03, 85}, - {0, 0x03, 86}, - {0, 0x03, 89}, - {0, 0x03, 95}, - {0, 0x03, 106}, - {0, 0x03, 107}, - {0, 0x03, 113}, - {0, 0x03, 122}, - {73, 0x00, 0}, - {74, 0x00, 0}, - {76, 0x00, 0}, - {78, 0x00, 0}, -}, -/* 60 */ -{ - {1, 0x02, 72}, - {12, 0x03, 72}, - {1, 0x02, 76}, - {12, 0x03, 76}, - {1, 0x02, 80}, - {12, 0x03, 80}, - {1, 0x02, 82}, - {12, 0x03, 82}, - {1, 0x02, 85}, - {12, 0x03, 85}, - {1, 0x02, 86}, - {12, 0x03, 86}, - {1, 0x02, 89}, - {12, 0x03, 89}, - {1, 0x02, 95}, - {12, 0x03, 95}, -}, -/* 61 */ -{ - {2, 0x02, 72}, - {5, 0x02, 72}, - {13, 0x02, 72}, - {27, 0x03, 72}, - {2, 0x02, 76}, - {5, 0x02, 76}, - {13, 0x02, 76}, - {27, 0x03, 76}, - {2, 0x02, 80}, - {5, 0x02, 80}, - {13, 0x02, 80}, - {27, 0x03, 80}, - {2, 0x02, 82}, - {5, 0x02, 82}, - {13, 0x02, 82}, - {27, 0x03, 82}, -}, -/* 62 */ -{ - {3, 0x02, 72}, - {4, 0x02, 72}, - {6, 0x02, 72}, - {9, 0x02, 72}, - {14, 0x02, 72}, - {20, 0x02, 72}, - {28, 0x02, 72}, - {38, 0x03, 72}, - {3, 0x02, 76}, - {4, 0x02, 76}, - {6, 0x02, 76}, - {9, 0x02, 76}, - {14, 0x02, 76}, - {20, 0x02, 76}, - {28, 0x02, 76}, - {38, 0x03, 76}, -}, -/* 63 */ -{ - {3, 0x02, 80}, - {4, 0x02, 80}, - {6, 0x02, 80}, - {9, 0x02, 80}, - {14, 0x02, 80}, - {20, 0x02, 80}, - {28, 0x02, 80}, - {38, 0x03, 80}, - {3, 0x02, 82}, - {4, 0x02, 82}, - {6, 0x02, 82}, - {9, 0x02, 82}, - {14, 0x02, 82}, - {20, 0x02, 82}, - {28, 0x02, 82}, - {38, 0x03, 82}, -}, -/* 64 */ -{ - {2, 0x02, 85}, - {5, 0x02, 85}, - {13, 0x02, 85}, - {27, 0x03, 85}, - {2, 0x02, 86}, - {5, 0x02, 86}, - {13, 0x02, 86}, - {27, 0x03, 86}, - {2, 0x02, 89}, - {5, 0x02, 89}, - {13, 0x02, 89}, - {27, 0x03, 89}, - {2, 0x02, 95}, - {5, 0x02, 95}, - {13, 0x02, 95}, - {27, 0x03, 95}, -}, -/* 65 */ -{ - {3, 0x02, 85}, - {4, 0x02, 85}, - {6, 0x02, 85}, - {9, 0x02, 85}, - {14, 0x02, 85}, - {20, 0x02, 85}, - {28, 0x02, 85}, - {38, 0x03, 85}, - {3, 0x02, 86}, - {4, 0x02, 86}, - {6, 0x02, 86}, - {9, 0x02, 86}, - {14, 0x02, 86}, - {20, 0x02, 86}, - {28, 0x02, 86}, - {38, 0x03, 86}, -}, -/* 66 */ -{ - {3, 0x02, 89}, - {4, 0x02, 89}, - {6, 0x02, 89}, - {9, 0x02, 89}, - {14, 0x02, 89}, - {20, 0x02, 89}, - {28, 0x02, 89}, - {38, 0x03, 89}, - {3, 0x02, 95}, - {4, 0x02, 95}, - {6, 0x02, 95}, - {9, 0x02, 95}, - {14, 0x02, 95}, - {20, 0x02, 95}, - {28, 0x02, 95}, - {38, 0x03, 95}, -}, -/* 67 */ -{ - {1, 0x02, 106}, - {12, 0x03, 106}, - {1, 0x02, 107}, - {12, 0x03, 107}, - {1, 0x02, 113}, - {12, 0x03, 113}, - {1, 0x02, 122}, - {12, 0x03, 122}, - {0, 0x03, 38}, - {0, 0x03, 75}, - {0, 0x03, 81}, - {0, 0x03, 88}, - {0, 0x03, 90}, - {77, 0x00, 0}, - {79, 0x00, 0}, - {81, 0x00, 0}, -}, -/* 68 */ -{ - {2, 0x02, 106}, - {5, 0x02, 106}, - {13, 0x02, 106}, - {27, 0x03, 106}, - {2, 0x02, 107}, - {5, 0x02, 107}, - {13, 0x02, 107}, - {27, 0x03, 107}, - {2, 0x02, 113}, - {5, 0x02, 113}, - {13, 0x02, 113}, - {27, 0x03, 113}, - {2, 0x02, 122}, - {5, 0x02, 122}, - {13, 0x02, 122}, - {27, 0x03, 122}, -}, -/* 69 */ -{ - {3, 0x02, 106}, - {4, 0x02, 106}, - {6, 0x02, 106}, - {9, 0x02, 106}, - {14, 0x02, 106}, - {20, 0x02, 106}, - {28, 0x02, 106}, - {38, 0x03, 106}, - {3, 0x02, 107}, - {4, 0x02, 107}, - {6, 0x02, 107}, - {9, 0x02, 107}, - {14, 0x02, 107}, - {20, 0x02, 107}, - {28, 0x02, 107}, - {38, 0x03, 107}, -}, -/* 70 */ -{ - {3, 0x02, 113}, - {4, 0x02, 113}, - {6, 0x02, 113}, - {9, 0x02, 113}, - {14, 0x02, 113}, - {20, 0x02, 113}, - {28, 0x02, 113}, - {38, 0x03, 113}, - {3, 0x02, 122}, - {4, 0x02, 122}, - {6, 0x02, 122}, - {9, 0x02, 122}, - {14, 0x02, 122}, - {20, 0x02, 122}, - {28, 0x02, 122}, - {38, 0x03, 122}, -}, -/* 71 */ -{ - {1, 0x02, 38}, - {12, 0x03, 38}, - {1, 0x02, 75}, - {12, 0x03, 75}, - {1, 0x02, 81}, - {12, 0x03, 81}, - {1, 0x02, 88}, - {12, 0x03, 88}, - {1, 0x02, 90}, - {12, 0x03, 90}, - {0, 0x03, 43}, - {0, 0x03, 91}, - {0, 0x03, 93}, - {80, 0x00, 0}, - {82, 0x00, 0}, - {84, 0x00, 0}, -}, -/* 72 */ -{ - {2, 0x02, 38}, - {5, 0x02, 38}, - {13, 0x02, 38}, - {27, 0x03, 38}, - {2, 0x02, 75}, - {5, 0x02, 75}, - {13, 0x02, 75}, - {27, 0x03, 75}, - {2, 0x02, 81}, - {5, 0x02, 81}, - {13, 0x02, 81}, - {27, 0x03, 81}, - {2, 0x02, 88}, - {5, 0x02, 88}, - {13, 0x02, 88}, - {27, 0x03, 88}, -}, -/* 73 */ -{ - {3, 0x02, 38}, - {4, 0x02, 38}, - {6, 0x02, 38}, - {9, 0x02, 38}, - {14, 0x02, 38}, - {20, 0x02, 38}, - {28, 0x02, 38}, - {38, 0x03, 38}, - {3, 0x02, 75}, - {4, 0x02, 75}, - {6, 0x02, 75}, - {9, 0x02, 75}, - {14, 0x02, 75}, - {20, 0x02, 75}, - {28, 0x02, 75}, - {38, 0x03, 75}, -}, -/* 74 */ -{ - {3, 0x02, 81}, - {4, 0x02, 81}, - {6, 0x02, 81}, - {9, 0x02, 81}, - {14, 0x02, 81}, - {20, 0x02, 81}, - {28, 0x02, 81}, - {38, 0x03, 81}, - {3, 0x02, 88}, - {4, 0x02, 88}, - {6, 0x02, 88}, - {9, 0x02, 88}, - {14, 0x02, 88}, - {20, 0x02, 88}, - {28, 0x02, 88}, - {38, 0x03, 88}, -}, -/* 75 */ -{ - {2, 0x02, 90}, - {5, 0x02, 90}, - {13, 0x02, 90}, - {27, 0x03, 90}, - {1, 0x02, 43}, - {12, 0x03, 43}, - {1, 0x02, 91}, - {12, 0x03, 91}, - {1, 0x02, 93}, - {12, 0x03, 93}, - {0, 0x03, 33}, - {0, 0x03, 42}, - {0, 0x03, 63}, - {83, 0x00, 0}, - {85, 0x00, 0}, - {86, 0x00, 0}, -}, -/* 76 */ -{ - {3, 0x02, 90}, - {4, 0x02, 90}, - {6, 0x02, 90}, - {9, 0x02, 90}, - {14, 0x02, 90}, - {20, 0x02, 90}, - {28, 0x02, 90}, - {38, 0x03, 90}, - {2, 0x02, 43}, - {5, 0x02, 43}, - {13, 0x02, 43}, - {27, 0x03, 43}, - {2, 0x02, 91}, - {5, 0x02, 91}, - {13, 0x02, 91}, - {27, 0x03, 91}, -}, -/* 77 */ -{ - {3, 0x02, 43}, - {4, 0x02, 43}, - {6, 0x02, 43}, - {9, 0x02, 43}, - {14, 0x02, 43}, - {20, 0x02, 43}, - {28, 0x02, 43}, - {38, 0x03, 43}, - {3, 0x02, 91}, - {4, 0x02, 91}, - {6, 0x02, 91}, - {9, 0x02, 91}, - {14, 0x02, 91}, - {20, 0x02, 91}, - {28, 0x02, 91}, - {38, 0x03, 91}, -}, -/* 78 */ -{ - {2, 0x02, 93}, - {5, 0x02, 93}, - {13, 0x02, 93}, - {27, 0x03, 93}, - {1, 0x02, 33}, - {12, 0x03, 33}, - {1, 0x02, 42}, - {12, 0x03, 42}, - {1, 0x02, 63}, - {12, 0x03, 63}, - {0, 0x03, 35}, - {0, 0x03, 39}, - {0, 0x03, 62}, - {0, 0x03, 92}, - {87, 0x00, 0}, - {88, 0x00, 0}, -}, -/* 79 */ -{ - {3, 0x02, 93}, - {4, 0x02, 93}, - {6, 0x02, 93}, - {9, 0x02, 93}, - {14, 0x02, 93}, - {20, 0x02, 93}, - {28, 0x02, 93}, - {38, 0x03, 93}, - {2, 0x02, 33}, - {5, 0x02, 33}, - {13, 0x02, 33}, - {27, 0x03, 33}, - {2, 0x02, 42}, - {5, 0x02, 42}, - {13, 0x02, 42}, - {27, 0x03, 42}, -}, -/* 80 */ -{ - {3, 0x02, 33}, - {4, 0x02, 33}, - {6, 0x02, 33}, - {9, 0x02, 33}, - {14, 0x02, 33}, - {20, 0x02, 33}, - {28, 0x02, 33}, - {38, 0x03, 33}, - {3, 0x02, 42}, - {4, 0x02, 42}, - {6, 0x02, 42}, - {9, 0x02, 42}, - {14, 0x02, 42}, - {20, 0x02, 42}, - {28, 0x02, 42}, - {38, 0x03, 42}, -}, -/* 81 */ -{ - {2, 0x02, 63}, - {5, 0x02, 63}, - {13, 0x02, 63}, - {27, 0x03, 63}, - {1, 0x02, 35}, - {12, 0x03, 35}, - {1, 0x02, 39}, - {12, 0x03, 39}, - {1, 0x02, 62}, - {12, 0x03, 62}, - {1, 0x02, 92}, - {12, 0x03, 92}, - {0, 0x03, 36}, - {0, 0x03, 124}, - {89, 0x00, 0}, - {91, 0x00, 0}, -}, -/* 82 */ -{ - {3, 0x02, 63}, - {4, 0x02, 63}, - {6, 0x02, 63}, - {9, 0x02, 63}, - {14, 0x02, 63}, - {20, 0x02, 63}, - {28, 0x02, 63}, - {38, 0x03, 63}, - {2, 0x02, 35}, - {5, 0x02, 35}, - {13, 0x02, 35}, - {27, 0x03, 35}, - {2, 0x02, 39}, - {5, 0x02, 39}, - {13, 0x02, 39}, - {27, 0x03, 39}, -}, -/* 83 */ -{ - {3, 0x02, 35}, - {4, 0x02, 35}, - {6, 0x02, 35}, - {9, 0x02, 35}, - {14, 0x02, 35}, - {20, 0x02, 35}, - {28, 0x02, 35}, - {38, 0x03, 35}, - {3, 0x02, 39}, - {4, 0x02, 39}, - {6, 0x02, 39}, - {9, 0x02, 39}, - {14, 0x02, 39}, - {20, 0x02, 39}, - {28, 0x02, 39}, - {38, 0x03, 39}, -}, -/* 84 */ -{ - {2, 0x02, 62}, - {5, 0x02, 62}, - {13, 0x02, 62}, - {27, 0x03, 62}, - {2, 0x02, 92}, - {5, 0x02, 92}, - {13, 0x02, 92}, - {27, 0x03, 92}, - {1, 0x02, 36}, - {12, 0x03, 36}, - {1, 0x02, 124}, - {12, 0x03, 124}, - {0, 0x03, 94}, - {90, 0x00, 0}, - {92, 0x00, 0}, - {93, 0x00, 0}, -}, -/* 85 */ -{ - {3, 0x02, 62}, - {4, 0x02, 62}, - {6, 0x02, 62}, - {9, 0x02, 62}, - {14, 0x02, 62}, - {20, 0x02, 62}, - {28, 0x02, 62}, - {38, 0x03, 62}, - {3, 0x02, 92}, - {4, 0x02, 92}, - {6, 0x02, 92}, - {9, 0x02, 92}, - {14, 0x02, 92}, - {20, 0x02, 92}, - {28, 0x02, 92}, - {38, 0x03, 92}, -}, -/* 86 */ -{ - {2, 0x02, 36}, - {5, 0x02, 36}, - {13, 0x02, 36}, - {27, 0x03, 36}, - {2, 0x02, 124}, - {5, 0x02, 124}, - {13, 0x02, 124}, - {27, 0x03, 124}, - {1, 0x02, 94}, - {12, 0x03, 94}, - {0, 0x03, 60}, - {0, 0x03, 64}, - {0, 0x03, 123}, - {0, 0x03, 125}, - {0, 0x03, 126}, - {94, 0x00, 0}, -}, -/* 87 */ -{ - {3, 0x02, 36}, - {4, 0x02, 36}, - {6, 0x02, 36}, - {9, 0x02, 36}, - {14, 0x02, 36}, - {20, 0x02, 36}, - {28, 0x02, 36}, - {38, 0x03, 36}, - {3, 0x02, 124}, - {4, 0x02, 124}, - {6, 0x02, 124}, - {9, 0x02, 124}, - {14, 0x02, 124}, - {20, 0x02, 124}, - {28, 0x02, 124}, - {38, 0x03, 124}, -}, -/* 88 */ -{ - {2, 0x02, 94}, - {5, 0x02, 94}, - {13, 0x02, 94}, - {27, 0x03, 94}, - {1, 0x02, 60}, - {12, 0x03, 60}, - {1, 0x02, 64}, - {12, 0x03, 64}, - {1, 0x02, 123}, - {12, 0x03, 123}, - {1, 0x02, 125}, - {12, 0x03, 125}, - {1, 0x02, 126}, - {12, 0x03, 126}, - {0, 0x03, 96}, - {95, 0x00, 0}, -}, -/* 89 */ -{ - {3, 0x02, 94}, - {4, 0x02, 94}, - {6, 0x02, 94}, - {9, 0x02, 94}, - {14, 0x02, 94}, - {20, 0x02, 94}, - {28, 0x02, 94}, - {38, 0x03, 94}, - {2, 0x02, 60}, - {5, 0x02, 60}, - {13, 0x02, 60}, - {27, 0x03, 60}, - {2, 0x02, 64}, - {5, 0x02, 64}, - {13, 0x02, 64}, - {27, 0x03, 64}, -}, -/* 90 */ -{ - {3, 0x02, 60}, - {4, 0x02, 60}, - {6, 0x02, 60}, - {9, 0x02, 60}, - {14, 0x02, 60}, - {20, 0x02, 60}, - {28, 0x02, 60}, - {38, 0x03, 60}, - {3, 0x02, 64}, - {4, 0x02, 64}, - {6, 0x02, 64}, - {9, 0x02, 64}, - {14, 0x02, 64}, - {20, 0x02, 64}, - {28, 0x02, 64}, - {38, 0x03, 64}, -}, -/* 91 */ -{ - {2, 0x02, 123}, - {5, 0x02, 123}, - {13, 0x02, 123}, - {27, 0x03, 123}, - {2, 0x02, 125}, - {5, 0x02, 125}, - {13, 0x02, 125}, - {27, 0x03, 125}, - {2, 0x02, 126}, - {5, 0x02, 126}, - {13, 0x02, 126}, - {27, 0x03, 126}, - {1, 0x02, 96}, - {12, 0x03, 96}, - {96, 0x00, 0}, - {159, 0x00, 0}, -}, -/* 92 */ -{ - {3, 0x02, 123}, - {4, 0x02, 123}, - {6, 0x02, 123}, - {9, 0x02, 123}, - {14, 0x02, 123}, - {20, 0x02, 123}, - {28, 0x02, 123}, - {38, 0x03, 123}, - {3, 0x02, 125}, - {4, 0x02, 125}, - {6, 0x02, 125}, - {9, 0x02, 125}, - {14, 0x02, 125}, - {20, 0x02, 125}, - {28, 0x02, 125}, - {38, 0x03, 125}, -}, -/* 93 */ -{ - {3, 0x02, 126}, - {4, 0x02, 126}, - {6, 0x02, 126}, - {9, 0x02, 126}, - {14, 0x02, 126}, - {20, 0x02, 126}, - {28, 0x02, 126}, - {38, 0x03, 126}, - {2, 0x02, 96}, - {5, 0x02, 96}, - {13, 0x02, 96}, - {27, 0x03, 96}, - {97, 0x00, 0}, - {128, 0x00, 0}, - {160, 0x00, 0}, - {193, 0x00, 0}, -}, -/* 94 */ -{ - {3, 0x02, 96}, - {4, 0x02, 96}, - {6, 0x02, 96}, - {9, 0x02, 96}, - {14, 0x02, 96}, - {20, 0x02, 96}, - {28, 0x02, 96}, - {38, 0x03, 96}, - {98, 0x00, 0}, - {113, 0x00, 0}, - {129, 0x00, 0}, - {144, 0x00, 0}, - {161, 0x00, 0}, - {176, 0x00, 0}, - {194, 0x00, 0}, - {225, 0x00, 0}, -}, -/* 95 */ -{ - {99, 0x00, 0}, - {106, 0x00, 0}, - {114, 0x00, 0}, - {121, 0x00, 0}, - {130, 0x00, 0}, - {137, 0x00, 0}, - {145, 0x00, 0}, - {152, 0x00, 0}, - {162, 0x00, 0}, - {169, 0x00, 0}, - {177, 0x00, 0}, - {184, 0x00, 0}, - {195, 0x00, 0}, - {210, 0x00, 0}, - {226, 0x00, 0}, - {241, 0x00, 0}, -}, -/* 96 */ -{ - {100, 0x00, 0}, - {103, 0x00, 0}, - {107, 0x00, 0}, - {110, 0x00, 0}, - {115, 0x00, 0}, - {118, 0x00, 0}, - {122, 0x00, 0}, - {125, 0x00, 0}, - {131, 0x00, 0}, - {134, 0x00, 0}, - {138, 0x00, 0}, - {141, 0x00, 0}, - {146, 0x00, 0}, - {149, 0x00, 0}, - {153, 0x00, 0}, - {156, 0x00, 0}, -}, -/* 97 */ -{ - {101, 0x00, 0}, - {102, 0x00, 0}, - {104, 0x00, 0}, - {105, 0x00, 0}, - {108, 0x00, 0}, - {109, 0x00, 0}, - {111, 0x00, 0}, - {112, 0x00, 0}, - {116, 0x00, 0}, - {117, 0x00, 0}, - {119, 0x00, 0}, - {120, 0x00, 0}, - {123, 0x00, 0}, - {124, 0x00, 0}, - {126, 0x00, 0}, - {127, 0x00, 0}, -}, -/* 98 */ -{ - {0, 0x03, 163}, - {0, 0x03, 164}, - {0, 0x03, 165}, - {0, 0x03, 166}, - {0, 0x03, 167}, - {0, 0x03, 168}, - {0, 0x03, 169}, - {0, 0x03, 170}, - {0, 0x03, 171}, - {0, 0x03, 172}, - {0, 0x03, 173}, - {0, 0x03, 174}, - {0, 0x03, 175}, - {0, 0x03, 176}, - {0, 0x03, 177}, - {0, 0x03, 178}, -}, -/* 99 */ -{ - {1, 0x02, 163}, - {12, 0x03, 163}, - {1, 0x02, 164}, - {12, 0x03, 164}, - {1, 0x02, 165}, - {12, 0x03, 165}, - {1, 0x02, 166}, - {12, 0x03, 166}, - {1, 0x02, 167}, - {12, 0x03, 167}, - {1, 0x02, 168}, - {12, 0x03, 168}, - {1, 0x02, 169}, - {12, 0x03, 169}, - {1, 0x02, 170}, - {12, 0x03, 170}, -}, -/* 100 */ -{ - {2, 0x02, 163}, - {5, 0x02, 163}, - {13, 0x02, 163}, - {27, 0x03, 163}, - {2, 0x02, 164}, - {5, 0x02, 164}, - {13, 0x02, 164}, - {27, 0x03, 164}, - {2, 0x02, 165}, - {5, 0x02, 165}, - {13, 0x02, 165}, - {27, 0x03, 165}, - {2, 0x02, 166}, - {5, 0x02, 166}, - {13, 0x02, 166}, - {27, 0x03, 166}, -}, -/* 101 */ -{ - {3, 0x02, 163}, - {4, 0x02, 163}, - {6, 0x02, 163}, - {9, 0x02, 163}, - {14, 0x02, 163}, - {20, 0x02, 163}, - {28, 0x02, 163}, - {38, 0x03, 163}, - {3, 0x02, 164}, - {4, 0x02, 164}, - {6, 0x02, 164}, - {9, 0x02, 164}, - {14, 0x02, 164}, - {20, 0x02, 164}, - {28, 0x02, 164}, - {38, 0x03, 164}, -}, -/* 102 */ -{ - {3, 0x02, 165}, - {4, 0x02, 165}, - {6, 0x02, 165}, - {9, 0x02, 165}, - {14, 0x02, 165}, - {20, 0x02, 165}, - {28, 0x02, 165}, - {38, 0x03, 165}, - {3, 0x02, 166}, - {4, 0x02, 166}, - {6, 0x02, 166}, - {9, 0x02, 166}, - {14, 0x02, 166}, - {20, 0x02, 166}, - {28, 0x02, 166}, - {38, 0x03, 166}, -}, -/* 103 */ -{ - {2, 0x02, 167}, - {5, 0x02, 167}, - {13, 0x02, 167}, - {27, 0x03, 167}, - {2, 0x02, 168}, - {5, 0x02, 168}, - {13, 0x02, 168}, - {27, 0x03, 168}, - {2, 0x02, 169}, - {5, 0x02, 169}, - {13, 0x02, 169}, - {27, 0x03, 169}, - {2, 0x02, 170}, - {5, 0x02, 170}, - {13, 0x02, 170}, - {27, 0x03, 170}, -}, -/* 104 */ -{ - {3, 0x02, 167}, - {4, 0x02, 167}, - {6, 0x02, 167}, - {9, 0x02, 167}, - {14, 0x02, 167}, - {20, 0x02, 167}, - {28, 0x02, 167}, - {38, 0x03, 167}, - {3, 0x02, 168}, - {4, 0x02, 168}, - {6, 0x02, 168}, - {9, 0x02, 168}, - {14, 0x02, 168}, - {20, 0x02, 168}, - {28, 0x02, 168}, - {38, 0x03, 168}, -}, -/* 105 */ -{ - {3, 0x02, 169}, - {4, 0x02, 169}, - {6, 0x02, 169}, - {9, 0x02, 169}, - {14, 0x02, 169}, - {20, 0x02, 169}, - {28, 0x02, 169}, - {38, 0x03, 169}, - {3, 0x02, 170}, - {4, 0x02, 170}, - {6, 0x02, 170}, - {9, 0x02, 170}, - {14, 0x02, 170}, - {20, 0x02, 170}, - {28, 0x02, 170}, - {38, 0x03, 170}, -}, -/* 106 */ -{ - {1, 0x02, 171}, - {12, 0x03, 171}, - {1, 0x02, 172}, - {12, 0x03, 172}, - {1, 0x02, 173}, - {12, 0x03, 173}, - {1, 0x02, 174}, - {12, 0x03, 174}, - {1, 0x02, 175}, - {12, 0x03, 175}, - {1, 0x02, 176}, - {12, 0x03, 176}, - {1, 0x02, 177}, - {12, 0x03, 177}, - {1, 0x02, 178}, - {12, 0x03, 178}, -}, -/* 107 */ -{ - {2, 0x02, 171}, - {5, 0x02, 171}, - {13, 0x02, 171}, - {27, 0x03, 171}, - {2, 0x02, 172}, - {5, 0x02, 172}, - {13, 0x02, 172}, - {27, 0x03, 172}, - {2, 0x02, 173}, - {5, 0x02, 173}, - {13, 0x02, 173}, - {27, 0x03, 173}, - {2, 0x02, 174}, - {5, 0x02, 174}, - {13, 0x02, 174}, - {27, 0x03, 174}, -}, -/* 108 */ -{ - {3, 0x02, 171}, - {4, 0x02, 171}, - {6, 0x02, 171}, - {9, 0x02, 171}, - {14, 0x02, 171}, - {20, 0x02, 171}, - {28, 0x02, 171}, - {38, 0x03, 171}, - {3, 0x02, 172}, - {4, 0x02, 172}, - {6, 0x02, 172}, - {9, 0x02, 172}, - {14, 0x02, 172}, - {20, 0x02, 172}, - {28, 0x02, 172}, - {38, 0x03, 172}, -}, -/* 109 */ -{ - {3, 0x02, 173}, - {4, 0x02, 173}, - {6, 0x02, 173}, - {9, 0x02, 173}, - {14, 0x02, 173}, - {20, 0x02, 173}, - {28, 0x02, 173}, - {38, 0x03, 173}, - {3, 0x02, 174}, - {4, 0x02, 174}, - {6, 0x02, 174}, - {9, 0x02, 174}, - {14, 0x02, 174}, - {20, 0x02, 174}, - {28, 0x02, 174}, - {38, 0x03, 174}, -}, -/* 110 */ -{ - {2, 0x02, 175}, - {5, 0x02, 175}, - {13, 0x02, 175}, - {27, 0x03, 175}, - {2, 0x02, 176}, - {5, 0x02, 176}, - {13, 0x02, 176}, - {27, 0x03, 176}, - {2, 0x02, 177}, - {5, 0x02, 177}, - {13, 0x02, 177}, - {27, 0x03, 177}, - {2, 0x02, 178}, - {5, 0x02, 178}, - {13, 0x02, 178}, - {27, 0x03, 178}, -}, -/* 111 */ -{ - {3, 0x02, 175}, - {4, 0x02, 175}, - {6, 0x02, 175}, - {9, 0x02, 175}, - {14, 0x02, 175}, - {20, 0x02, 175}, - {28, 0x02, 175}, - {38, 0x03, 175}, - {3, 0x02, 176}, - {4, 0x02, 176}, - {6, 0x02, 176}, - {9, 0x02, 176}, - {14, 0x02, 176}, - {20, 0x02, 176}, - {28, 0x02, 176}, - {38, 0x03, 176}, -}, -/* 112 */ -{ - {3, 0x02, 177}, - {4, 0x02, 177}, - {6, 0x02, 177}, - {9, 0x02, 177}, - {14, 0x02, 177}, - {20, 0x02, 177}, - {28, 0x02, 177}, - {38, 0x03, 177}, - {3, 0x02, 178}, - {4, 0x02, 178}, - {6, 0x02, 178}, - {9, 0x02, 178}, - {14, 0x02, 178}, - {20, 0x02, 178}, - {28, 0x02, 178}, - {38, 0x03, 178}, -}, -/* 113 */ -{ - {0, 0x03, 179}, - {0, 0x03, 180}, - {0, 0x03, 181}, - {0, 0x03, 182}, - {0, 0x03, 183}, - {0, 0x03, 184}, - {0, 0x03, 185}, - {0, 0x03, 186}, - {0, 0x03, 187}, - {0, 0x03, 188}, - {0, 0x03, 189}, - {0, 0x03, 190}, - {0, 0x03, 191}, - {0, 0x03, 192}, - {0, 0x03, 193}, - {0, 0x03, 194}, -}, -/* 114 */ -{ - {1, 0x02, 179}, - {12, 0x03, 179}, - {1, 0x02, 180}, - {12, 0x03, 180}, - {1, 0x02, 181}, - {12, 0x03, 181}, - {1, 0x02, 182}, - {12, 0x03, 182}, - {1, 0x02, 183}, - {12, 0x03, 183}, - {1, 0x02, 184}, - {12, 0x03, 184}, - {1, 0x02, 185}, - {12, 0x03, 185}, - {1, 0x02, 186}, - {12, 0x03, 186}, -}, -/* 115 */ -{ - {2, 0x02, 179}, - {5, 0x02, 179}, - {13, 0x02, 179}, - {27, 0x03, 179}, - {2, 0x02, 180}, - {5, 0x02, 180}, - {13, 0x02, 180}, - {27, 0x03, 180}, - {2, 0x02, 181}, - {5, 0x02, 181}, - {13, 0x02, 181}, - {27, 0x03, 181}, - {2, 0x02, 182}, - {5, 0x02, 182}, - {13, 0x02, 182}, - {27, 0x03, 182}, -}, -/* 116 */ -{ - {3, 0x02, 179}, - {4, 0x02, 179}, - {6, 0x02, 179}, - {9, 0x02, 179}, - {14, 0x02, 179}, - {20, 0x02, 179}, - {28, 0x02, 179}, - {38, 0x03, 179}, - {3, 0x02, 180}, - {4, 0x02, 180}, - {6, 0x02, 180}, - {9, 0x02, 180}, - {14, 0x02, 180}, - {20, 0x02, 180}, - {28, 0x02, 180}, - {38, 0x03, 180}, -}, -/* 117 */ -{ - {3, 0x02, 181}, - {4, 0x02, 181}, - {6, 0x02, 181}, - {9, 0x02, 181}, - {14, 0x02, 181}, - {20, 0x02, 181}, - {28, 0x02, 181}, - {38, 0x03, 181}, - {3, 0x02, 182}, - {4, 0x02, 182}, - {6, 0x02, 182}, - {9, 0x02, 182}, - {14, 0x02, 182}, - {20, 0x02, 182}, - {28, 0x02, 182}, - {38, 0x03, 182}, -}, -/* 118 */ -{ - {2, 0x02, 183}, - {5, 0x02, 183}, - {13, 0x02, 183}, - {27, 0x03, 183}, - {2, 0x02, 184}, - {5, 0x02, 184}, - {13, 0x02, 184}, - {27, 0x03, 184}, - {2, 0x02, 185}, - {5, 0x02, 185}, - {13, 0x02, 185}, - {27, 0x03, 185}, - {2, 0x02, 186}, - {5, 0x02, 186}, - {13, 0x02, 186}, - {27, 0x03, 186}, -}, -/* 119 */ -{ - {3, 0x02, 183}, - {4, 0x02, 183}, - {6, 0x02, 183}, - {9, 0x02, 183}, - {14, 0x02, 183}, - {20, 0x02, 183}, - {28, 0x02, 183}, - {38, 0x03, 183}, - {3, 0x02, 184}, - {4, 0x02, 184}, - {6, 0x02, 184}, - {9, 0x02, 184}, - {14, 0x02, 184}, - {20, 0x02, 184}, - {28, 0x02, 184}, - {38, 0x03, 184}, -}, -/* 120 */ -{ - {3, 0x02, 185}, - {4, 0x02, 185}, - {6, 0x02, 185}, - {9, 0x02, 185}, - {14, 0x02, 185}, - {20, 0x02, 185}, - {28, 0x02, 185}, - {38, 0x03, 185}, - {3, 0x02, 186}, - {4, 0x02, 186}, - {6, 0x02, 186}, - {9, 0x02, 186}, - {14, 0x02, 186}, - {20, 0x02, 186}, - {28, 0x02, 186}, - {38, 0x03, 186}, -}, -/* 121 */ -{ - {1, 0x02, 187}, - {12, 0x03, 187}, - {1, 0x02, 188}, - {12, 0x03, 188}, - {1, 0x02, 189}, - {12, 0x03, 189}, - {1, 0x02, 190}, - {12, 0x03, 190}, - {1, 0x02, 191}, - {12, 0x03, 191}, - {1, 0x02, 192}, - {12, 0x03, 192}, - {1, 0x02, 193}, - {12, 0x03, 193}, - {1, 0x02, 194}, - {12, 0x03, 194}, -}, -/* 122 */ -{ - {2, 0x02, 187}, - {5, 0x02, 187}, - {13, 0x02, 187}, - {27, 0x03, 187}, - {2, 0x02, 188}, - {5, 0x02, 188}, - {13, 0x02, 188}, - {27, 0x03, 188}, - {2, 0x02, 189}, - {5, 0x02, 189}, - {13, 0x02, 189}, - {27, 0x03, 189}, - {2, 0x02, 190}, - {5, 0x02, 190}, - {13, 0x02, 190}, - {27, 0x03, 190}, -}, -/* 123 */ -{ - {3, 0x02, 187}, - {4, 0x02, 187}, - {6, 0x02, 187}, - {9, 0x02, 187}, - {14, 0x02, 187}, - {20, 0x02, 187}, - {28, 0x02, 187}, - {38, 0x03, 187}, - {3, 0x02, 188}, - {4, 0x02, 188}, - {6, 0x02, 188}, - {9, 0x02, 188}, - {14, 0x02, 188}, - {20, 0x02, 188}, - {28, 0x02, 188}, - {38, 0x03, 188}, -}, -/* 124 */ -{ - {3, 0x02, 189}, - {4, 0x02, 189}, - {6, 0x02, 189}, - {9, 0x02, 189}, - {14, 0x02, 189}, - {20, 0x02, 189}, - {28, 0x02, 189}, - {38, 0x03, 189}, - {3, 0x02, 190}, - {4, 0x02, 190}, - {6, 0x02, 190}, - {9, 0x02, 190}, - {14, 0x02, 190}, - {20, 0x02, 190}, - {28, 0x02, 190}, - {38, 0x03, 190}, -}, -/* 125 */ -{ - {2, 0x02, 191}, - {5, 0x02, 191}, - {13, 0x02, 191}, - {27, 0x03, 191}, - {2, 0x02, 192}, - {5, 0x02, 192}, - {13, 0x02, 192}, - {27, 0x03, 192}, - {2, 0x02, 193}, - {5, 0x02, 193}, - {13, 0x02, 193}, - {27, 0x03, 193}, - {2, 0x02, 194}, - {5, 0x02, 194}, - {13, 0x02, 194}, - {27, 0x03, 194}, -}, -/* 126 */ -{ - {3, 0x02, 191}, - {4, 0x02, 191}, - {6, 0x02, 191}, - {9, 0x02, 191}, - {14, 0x02, 191}, - {20, 0x02, 191}, - {28, 0x02, 191}, - {38, 0x03, 191}, - {3, 0x02, 192}, - {4, 0x02, 192}, - {6, 0x02, 192}, - {9, 0x02, 192}, - {14, 0x02, 192}, - {20, 0x02, 192}, - {28, 0x02, 192}, - {38, 0x03, 192}, -}, -/* 127 */ -{ - {3, 0x02, 193}, - {4, 0x02, 193}, - {6, 0x02, 193}, - {9, 0x02, 193}, - {14, 0x02, 193}, - {20, 0x02, 193}, - {28, 0x02, 193}, - {38, 0x03, 193}, - {3, 0x02, 194}, - {4, 0x02, 194}, - {6, 0x02, 194}, - {9, 0x02, 194}, - {14, 0x02, 194}, - {20, 0x02, 194}, - {28, 0x02, 194}, - {38, 0x03, 194}, -}, -/* 128 */ -{ - {132, 0x00, 0}, - {133, 0x00, 0}, - {135, 0x00, 0}, - {136, 0x00, 0}, - {139, 0x00, 0}, - {140, 0x00, 0}, - {142, 0x00, 0}, - {143, 0x00, 0}, - {147, 0x00, 0}, - {148, 0x00, 0}, - {150, 0x00, 0}, - {151, 0x00, 0}, - {154, 0x00, 0}, - {155, 0x00, 0}, - {157, 0x00, 0}, - {158, 0x00, 0}, -}, -/* 129 */ -{ - {0, 0x03, 195}, - {0, 0x03, 196}, - {0, 0x03, 197}, - {0, 0x03, 198}, - {0, 0x03, 199}, - {0, 0x03, 200}, - {0, 0x03, 201}, - {0, 0x03, 202}, - {0, 0x03, 203}, - {0, 0x03, 204}, - {0, 0x03, 205}, - {0, 0x03, 206}, - {0, 0x03, 207}, - {0, 0x03, 208}, - {0, 0x03, 209}, - {0, 0x03, 210}, -}, -/* 130 */ -{ - {1, 0x02, 195}, - {12, 0x03, 195}, - {1, 0x02, 196}, - {12, 0x03, 196}, - {1, 0x02, 197}, - {12, 0x03, 197}, - {1, 0x02, 198}, - {12, 0x03, 198}, - {1, 0x02, 199}, - {12, 0x03, 199}, - {1, 0x02, 200}, - {12, 0x03, 200}, - {1, 0x02, 201}, - {12, 0x03, 201}, - {1, 0x02, 202}, - {12, 0x03, 202}, -}, -/* 131 */ -{ - {2, 0x02, 195}, - {5, 0x02, 195}, - {13, 0x02, 195}, - {27, 0x03, 195}, - {2, 0x02, 196}, - {5, 0x02, 196}, - {13, 0x02, 196}, - {27, 0x03, 196}, - {2, 0x02, 197}, - {5, 0x02, 197}, - {13, 0x02, 197}, - {27, 0x03, 197}, - {2, 0x02, 198}, - {5, 0x02, 198}, - {13, 0x02, 198}, - {27, 0x03, 198}, -}, -/* 132 */ -{ - {3, 0x02, 195}, - {4, 0x02, 195}, - {6, 0x02, 195}, - {9, 0x02, 195}, - {14, 0x02, 195}, - {20, 0x02, 195}, - {28, 0x02, 195}, - {38, 0x03, 195}, - {3, 0x02, 196}, - {4, 0x02, 196}, - {6, 0x02, 196}, - {9, 0x02, 196}, - {14, 0x02, 196}, - {20, 0x02, 196}, - {28, 0x02, 196}, - {38, 0x03, 196}, -}, -/* 133 */ -{ - {3, 0x02, 197}, - {4, 0x02, 197}, - {6, 0x02, 197}, - {9, 0x02, 197}, - {14, 0x02, 197}, - {20, 0x02, 197}, - {28, 0x02, 197}, - {38, 0x03, 197}, - {3, 0x02, 198}, - {4, 0x02, 198}, - {6, 0x02, 198}, - {9, 0x02, 198}, - {14, 0x02, 198}, - {20, 0x02, 198}, - {28, 0x02, 198}, - {38, 0x03, 198}, -}, -/* 134 */ -{ - {2, 0x02, 199}, - {5, 0x02, 199}, - {13, 0x02, 199}, - {27, 0x03, 199}, - {2, 0x02, 200}, - {5, 0x02, 200}, - {13, 0x02, 200}, - {27, 0x03, 200}, - {2, 0x02, 201}, - {5, 0x02, 201}, - {13, 0x02, 201}, - {27, 0x03, 201}, - {2, 0x02, 202}, - {5, 0x02, 202}, - {13, 0x02, 202}, - {27, 0x03, 202}, -}, -/* 135 */ -{ - {3, 0x02, 199}, - {4, 0x02, 199}, - {6, 0x02, 199}, - {9, 0x02, 199}, - {14, 0x02, 199}, - {20, 0x02, 199}, - {28, 0x02, 199}, - {38, 0x03, 199}, - {3, 0x02, 200}, - {4, 0x02, 200}, - {6, 0x02, 200}, - {9, 0x02, 200}, - {14, 0x02, 200}, - {20, 0x02, 200}, - {28, 0x02, 200}, - {38, 0x03, 200}, -}, -/* 136 */ -{ - {3, 0x02, 201}, - {4, 0x02, 201}, - {6, 0x02, 201}, - {9, 0x02, 201}, - {14, 0x02, 201}, - {20, 0x02, 201}, - {28, 0x02, 201}, - {38, 0x03, 201}, - {3, 0x02, 202}, - {4, 0x02, 202}, - {6, 0x02, 202}, - {9, 0x02, 202}, - {14, 0x02, 202}, - {20, 0x02, 202}, - {28, 0x02, 202}, - {38, 0x03, 202}, -}, -/* 137 */ -{ - {1, 0x02, 203}, - {12, 0x03, 203}, - {1, 0x02, 204}, - {12, 0x03, 204}, - {1, 0x02, 205}, - {12, 0x03, 205}, - {1, 0x02, 206}, - {12, 0x03, 206}, - {1, 0x02, 207}, - {12, 0x03, 207}, - {1, 0x02, 208}, - {12, 0x03, 208}, - {1, 0x02, 209}, - {12, 0x03, 209}, - {1, 0x02, 210}, - {12, 0x03, 210}, -}, -/* 138 */ -{ - {2, 0x02, 203}, - {5, 0x02, 203}, - {13, 0x02, 203}, - {27, 0x03, 203}, - {2, 0x02, 204}, - {5, 0x02, 204}, - {13, 0x02, 204}, - {27, 0x03, 204}, - {2, 0x02, 205}, - {5, 0x02, 205}, - {13, 0x02, 205}, - {27, 0x03, 205}, - {2, 0x02, 206}, - {5, 0x02, 206}, - {13, 0x02, 206}, - {27, 0x03, 206}, -}, -/* 139 */ -{ - {3, 0x02, 203}, - {4, 0x02, 203}, - {6, 0x02, 203}, - {9, 0x02, 203}, - {14, 0x02, 203}, - {20, 0x02, 203}, - {28, 0x02, 203}, - {38, 0x03, 203}, - {3, 0x02, 204}, - {4, 0x02, 204}, - {6, 0x02, 204}, - {9, 0x02, 204}, - {14, 0x02, 204}, - {20, 0x02, 204}, - {28, 0x02, 204}, - {38, 0x03, 204}, -}, -/* 140 */ -{ - {3, 0x02, 205}, - {4, 0x02, 205}, - {6, 0x02, 205}, - {9, 0x02, 205}, - {14, 0x02, 205}, - {20, 0x02, 205}, - {28, 0x02, 205}, - {38, 0x03, 205}, - {3, 0x02, 206}, - {4, 0x02, 206}, - {6, 0x02, 206}, - {9, 0x02, 206}, - {14, 0x02, 206}, - {20, 0x02, 206}, - {28, 0x02, 206}, - {38, 0x03, 206}, -}, -/* 141 */ -{ - {2, 0x02, 207}, - {5, 0x02, 207}, - {13, 0x02, 207}, - {27, 0x03, 207}, - {2, 0x02, 208}, - {5, 0x02, 208}, - {13, 0x02, 208}, - {27, 0x03, 208}, - {2, 0x02, 209}, - {5, 0x02, 209}, - {13, 0x02, 209}, - {27, 0x03, 209}, - {2, 0x02, 210}, - {5, 0x02, 210}, - {13, 0x02, 210}, - {27, 0x03, 210}, -}, -/* 142 */ -{ - {3, 0x02, 207}, - {4, 0x02, 207}, - {6, 0x02, 207}, - {9, 0x02, 207}, - {14, 0x02, 207}, - {20, 0x02, 207}, - {28, 0x02, 207}, - {38, 0x03, 207}, - {3, 0x02, 208}, - {4, 0x02, 208}, - {6, 0x02, 208}, - {9, 0x02, 208}, - {14, 0x02, 208}, - {20, 0x02, 208}, - {28, 0x02, 208}, - {38, 0x03, 208}, -}, -/* 143 */ -{ - {3, 0x02, 209}, - {4, 0x02, 209}, - {6, 0x02, 209}, - {9, 0x02, 209}, - {14, 0x02, 209}, - {20, 0x02, 209}, - {28, 0x02, 209}, - {38, 0x03, 209}, - {3, 0x02, 210}, - {4, 0x02, 210}, - {6, 0x02, 210}, - {9, 0x02, 210}, - {14, 0x02, 210}, - {20, 0x02, 210}, - {28, 0x02, 210}, - {38, 0x03, 210}, -}, -/* 144 */ -{ - {0, 0x03, 211}, - {0, 0x03, 212}, - {0, 0x03, 213}, - {0, 0x03, 214}, - {0, 0x03, 215}, - {0, 0x03, 216}, - {0, 0x03, 217}, - {0, 0x03, 218}, - {0, 0x03, 219}, - {0, 0x03, 220}, - {0, 0x03, 221}, - {0, 0x03, 222}, - {0, 0x03, 223}, - {0, 0x03, 224}, - {0, 0x03, 225}, - {0, 0x03, 226}, -}, -/* 145 */ -{ - {1, 0x02, 211}, - {12, 0x03, 211}, - {1, 0x02, 212}, - {12, 0x03, 212}, - {1, 0x02, 213}, - {12, 0x03, 213}, - {1, 0x02, 214}, - {12, 0x03, 214}, - {1, 0x02, 215}, - {12, 0x03, 215}, - {1, 0x02, 216}, - {12, 0x03, 216}, - {1, 0x02, 217}, - {12, 0x03, 217}, - {1, 0x02, 218}, - {12, 0x03, 218}, -}, -/* 146 */ -{ - {2, 0x02, 211}, - {5, 0x02, 211}, - {13, 0x02, 211}, - {27, 0x03, 211}, - {2, 0x02, 212}, - {5, 0x02, 212}, - {13, 0x02, 212}, - {27, 0x03, 212}, - {2, 0x02, 213}, - {5, 0x02, 213}, - {13, 0x02, 213}, - {27, 0x03, 213}, - {2, 0x02, 214}, - {5, 0x02, 214}, - {13, 0x02, 214}, - {27, 0x03, 214}, -}, -/* 147 */ -{ - {3, 0x02, 211}, - {4, 0x02, 211}, - {6, 0x02, 211}, - {9, 0x02, 211}, - {14, 0x02, 211}, - {20, 0x02, 211}, - {28, 0x02, 211}, - {38, 0x03, 211}, - {3, 0x02, 212}, - {4, 0x02, 212}, - {6, 0x02, 212}, - {9, 0x02, 212}, - {14, 0x02, 212}, - {20, 0x02, 212}, - {28, 0x02, 212}, - {38, 0x03, 212}, -}, -/* 148 */ -{ - {3, 0x02, 213}, - {4, 0x02, 213}, - {6, 0x02, 213}, - {9, 0x02, 213}, - {14, 0x02, 213}, - {20, 0x02, 213}, - {28, 0x02, 213}, - {38, 0x03, 213}, - {3, 0x02, 214}, - {4, 0x02, 214}, - {6, 0x02, 214}, - {9, 0x02, 214}, - {14, 0x02, 214}, - {20, 0x02, 214}, - {28, 0x02, 214}, - {38, 0x03, 214}, -}, -/* 149 */ -{ - {2, 0x02, 215}, - {5, 0x02, 215}, - {13, 0x02, 215}, - {27, 0x03, 215}, - {2, 0x02, 216}, - {5, 0x02, 216}, - {13, 0x02, 216}, - {27, 0x03, 216}, - {2, 0x02, 217}, - {5, 0x02, 217}, - {13, 0x02, 217}, - {27, 0x03, 217}, - {2, 0x02, 218}, - {5, 0x02, 218}, - {13, 0x02, 218}, - {27, 0x03, 218}, -}, -/* 150 */ -{ - {3, 0x02, 215}, - {4, 0x02, 215}, - {6, 0x02, 215}, - {9, 0x02, 215}, - {14, 0x02, 215}, - {20, 0x02, 215}, - {28, 0x02, 215}, - {38, 0x03, 215}, - {3, 0x02, 216}, - {4, 0x02, 216}, - {6, 0x02, 216}, - {9, 0x02, 216}, - {14, 0x02, 216}, - {20, 0x02, 216}, - {28, 0x02, 216}, - {38, 0x03, 216}, -}, -/* 151 */ -{ - {3, 0x02, 217}, - {4, 0x02, 217}, - {6, 0x02, 217}, - {9, 0x02, 217}, - {14, 0x02, 217}, - {20, 0x02, 217}, - {28, 0x02, 217}, - {38, 0x03, 217}, - {3, 0x02, 218}, - {4, 0x02, 218}, - {6, 0x02, 218}, - {9, 0x02, 218}, - {14, 0x02, 218}, - {20, 0x02, 218}, - {28, 0x02, 218}, - {38, 0x03, 218}, -}, -/* 152 */ -{ - {1, 0x02, 219}, - {12, 0x03, 219}, - {1, 0x02, 220}, - {12, 0x03, 220}, - {1, 0x02, 221}, - {12, 0x03, 221}, - {1, 0x02, 222}, - {12, 0x03, 222}, - {1, 0x02, 223}, - {12, 0x03, 223}, - {1, 0x02, 224}, - {12, 0x03, 224}, - {1, 0x02, 225}, - {12, 0x03, 225}, - {1, 0x02, 226}, - {12, 0x03, 226}, -}, -/* 153 */ -{ - {2, 0x02, 219}, - {5, 0x02, 219}, - {13, 0x02, 219}, - {27, 0x03, 219}, - {2, 0x02, 220}, - {5, 0x02, 220}, - {13, 0x02, 220}, - {27, 0x03, 220}, - {2, 0x02, 221}, - {5, 0x02, 221}, - {13, 0x02, 221}, - {27, 0x03, 221}, - {2, 0x02, 222}, - {5, 0x02, 222}, - {13, 0x02, 222}, - {27, 0x03, 222}, -}, -/* 154 */ -{ - {3, 0x02, 219}, - {4, 0x02, 219}, - {6, 0x02, 219}, - {9, 0x02, 219}, - {14, 0x02, 219}, - {20, 0x02, 219}, - {28, 0x02, 219}, - {38, 0x03, 219}, - {3, 0x02, 220}, - {4, 0x02, 220}, - {6, 0x02, 220}, - {9, 0x02, 220}, - {14, 0x02, 220}, - {20, 0x02, 220}, - {28, 0x02, 220}, - {38, 0x03, 220}, -}, -/* 155 */ -{ - {3, 0x02, 221}, - {4, 0x02, 221}, - {6, 0x02, 221}, - {9, 0x02, 221}, - {14, 0x02, 221}, - {20, 0x02, 221}, - {28, 0x02, 221}, - {38, 0x03, 221}, - {3, 0x02, 222}, - {4, 0x02, 222}, - {6, 0x02, 222}, - {9, 0x02, 222}, - {14, 0x02, 222}, - {20, 0x02, 222}, - {28, 0x02, 222}, - {38, 0x03, 222}, -}, -/* 156 */ -{ - {2, 0x02, 223}, - {5, 0x02, 223}, - {13, 0x02, 223}, - {27, 0x03, 223}, - {2, 0x02, 224}, - {5, 0x02, 224}, - {13, 0x02, 224}, - {27, 0x03, 224}, - {2, 0x02, 225}, - {5, 0x02, 225}, - {13, 0x02, 225}, - {27, 0x03, 225}, - {2, 0x02, 226}, - {5, 0x02, 226}, - {13, 0x02, 226}, - {27, 0x03, 226}, -}, -/* 157 */ -{ - {3, 0x02, 223}, - {4, 0x02, 223}, - {6, 0x02, 223}, - {9, 0x02, 223}, - {14, 0x02, 223}, - {20, 0x02, 223}, - {28, 0x02, 223}, - {38, 0x03, 223}, - {3, 0x02, 224}, - {4, 0x02, 224}, - {6, 0x02, 224}, - {9, 0x02, 224}, - {14, 0x02, 224}, - {20, 0x02, 224}, - {28, 0x02, 224}, - {38, 0x03, 224}, -}, -/* 158 */ -{ - {3, 0x02, 225}, - {4, 0x02, 225}, - {6, 0x02, 225}, - {9, 0x02, 225}, - {14, 0x02, 225}, - {20, 0x02, 225}, - {28, 0x02, 225}, - {38, 0x03, 225}, - {3, 0x02, 226}, - {4, 0x02, 226}, - {6, 0x02, 226}, - {9, 0x02, 226}, - {14, 0x02, 226}, - {20, 0x02, 226}, - {28, 0x02, 226}, - {38, 0x03, 226}, -}, -/* 159 */ -{ - {163, 0x00, 0}, - {166, 0x00, 0}, - {170, 0x00, 0}, - {173, 0x00, 0}, - {178, 0x00, 0}, - {181, 0x00, 0}, - {185, 0x00, 0}, - {188, 0x00, 0}, - {196, 0x00, 0}, - {203, 0x00, 0}, - {211, 0x00, 0}, - {218, 0x00, 0}, - {227, 0x00, 0}, - {234, 0x00, 0}, - {242, 0x00, 0}, - {249, 0x00, 0}, -}, -/* 160 */ -{ - {164, 0x00, 0}, - {165, 0x00, 0}, - {167, 0x00, 0}, - {168, 0x00, 0}, - {171, 0x00, 0}, - {172, 0x00, 0}, - {174, 0x00, 0}, - {175, 0x00, 0}, - {179, 0x00, 0}, - {180, 0x00, 0}, - {182, 0x00, 0}, - {183, 0x00, 0}, - {186, 0x00, 0}, - {187, 0x00, 0}, - {189, 0x00, 0}, - {190, 0x00, 0}, -}, -/* 161 */ -{ - {0, 0x03, 227}, - {0, 0x03, 228}, - {0, 0x03, 229}, - {0, 0x03, 230}, - {0, 0x03, 231}, - {0, 0x03, 232}, - {0, 0x03, 233}, - {0, 0x03, 234}, - {0, 0x03, 235}, - {0, 0x03, 236}, - {0, 0x03, 237}, - {0, 0x03, 238}, - {0, 0x03, 239}, - {0, 0x03, 240}, - {0, 0x03, 241}, - {0, 0x03, 242}, -}, -/* 162 */ -{ - {1, 0x02, 227}, - {12, 0x03, 227}, - {1, 0x02, 228}, - {12, 0x03, 228}, - {1, 0x02, 229}, - {12, 0x03, 229}, - {1, 0x02, 230}, - {12, 0x03, 230}, - {1, 0x02, 231}, - {12, 0x03, 231}, - {1, 0x02, 232}, - {12, 0x03, 232}, - {1, 0x02, 233}, - {12, 0x03, 233}, - {1, 0x02, 234}, - {12, 0x03, 234}, -}, -/* 163 */ -{ - {2, 0x02, 227}, - {5, 0x02, 227}, - {13, 0x02, 227}, - {27, 0x03, 227}, - {2, 0x02, 228}, - {5, 0x02, 228}, - {13, 0x02, 228}, - {27, 0x03, 228}, - {2, 0x02, 229}, - {5, 0x02, 229}, - {13, 0x02, 229}, - {27, 0x03, 229}, - {2, 0x02, 230}, - {5, 0x02, 230}, - {13, 0x02, 230}, - {27, 0x03, 230}, -}, -/* 164 */ -{ - {3, 0x02, 227}, - {4, 0x02, 227}, - {6, 0x02, 227}, - {9, 0x02, 227}, - {14, 0x02, 227}, - {20, 0x02, 227}, - {28, 0x02, 227}, - {38, 0x03, 227}, - {3, 0x02, 228}, - {4, 0x02, 228}, - {6, 0x02, 228}, - {9, 0x02, 228}, - {14, 0x02, 228}, - {20, 0x02, 228}, - {28, 0x02, 228}, - {38, 0x03, 228}, -}, -/* 165 */ -{ - {3, 0x02, 229}, - {4, 0x02, 229}, - {6, 0x02, 229}, - {9, 0x02, 229}, - {14, 0x02, 229}, - {20, 0x02, 229}, - {28, 0x02, 229}, - {38, 0x03, 229}, - {3, 0x02, 230}, - {4, 0x02, 230}, - {6, 0x02, 230}, - {9, 0x02, 230}, - {14, 0x02, 230}, - {20, 0x02, 230}, - {28, 0x02, 230}, - {38, 0x03, 230}, -}, -/* 166 */ -{ - {2, 0x02, 231}, - {5, 0x02, 231}, - {13, 0x02, 231}, - {27, 0x03, 231}, - {2, 0x02, 232}, - {5, 0x02, 232}, - {13, 0x02, 232}, - {27, 0x03, 232}, - {2, 0x02, 233}, - {5, 0x02, 233}, - {13, 0x02, 233}, - {27, 0x03, 233}, - {2, 0x02, 234}, - {5, 0x02, 234}, - {13, 0x02, 234}, - {27, 0x03, 234}, -}, -/* 167 */ -{ - {3, 0x02, 231}, - {4, 0x02, 231}, - {6, 0x02, 231}, - {9, 0x02, 231}, - {14, 0x02, 231}, - {20, 0x02, 231}, - {28, 0x02, 231}, - {38, 0x03, 231}, - {3, 0x02, 232}, - {4, 0x02, 232}, - {6, 0x02, 232}, - {9, 0x02, 232}, - {14, 0x02, 232}, - {20, 0x02, 232}, - {28, 0x02, 232}, - {38, 0x03, 232}, -}, -/* 168 */ -{ - {3, 0x02, 233}, - {4, 0x02, 233}, - {6, 0x02, 233}, - {9, 0x02, 233}, - {14, 0x02, 233}, - {20, 0x02, 233}, - {28, 0x02, 233}, - {38, 0x03, 233}, - {3, 0x02, 234}, - {4, 0x02, 234}, - {6, 0x02, 234}, - {9, 0x02, 234}, - {14, 0x02, 234}, - {20, 0x02, 234}, - {28, 0x02, 234}, - {38, 0x03, 234}, -}, -/* 169 */ -{ - {1, 0x02, 235}, - {12, 0x03, 235}, - {1, 0x02, 236}, - {12, 0x03, 236}, - {1, 0x02, 237}, - {12, 0x03, 237}, - {1, 0x02, 238}, - {12, 0x03, 238}, - {1, 0x02, 239}, - {12, 0x03, 239}, - {1, 0x02, 240}, - {12, 0x03, 240}, - {1, 0x02, 241}, - {12, 0x03, 241}, - {1, 0x02, 242}, - {12, 0x03, 242}, -}, -/* 170 */ -{ - {2, 0x02, 235}, - {5, 0x02, 235}, - {13, 0x02, 235}, - {27, 0x03, 235}, - {2, 0x02, 236}, - {5, 0x02, 236}, - {13, 0x02, 236}, - {27, 0x03, 236}, - {2, 0x02, 237}, - {5, 0x02, 237}, - {13, 0x02, 237}, - {27, 0x03, 237}, - {2, 0x02, 238}, - {5, 0x02, 238}, - {13, 0x02, 238}, - {27, 0x03, 238}, -}, -/* 171 */ -{ - {3, 0x02, 235}, - {4, 0x02, 235}, - {6, 0x02, 235}, - {9, 0x02, 235}, - {14, 0x02, 235}, - {20, 0x02, 235}, - {28, 0x02, 235}, - {38, 0x03, 235}, - {3, 0x02, 236}, - {4, 0x02, 236}, - {6, 0x02, 236}, - {9, 0x02, 236}, - {14, 0x02, 236}, - {20, 0x02, 236}, - {28, 0x02, 236}, - {38, 0x03, 236}, -}, -/* 172 */ -{ - {3, 0x02, 237}, - {4, 0x02, 237}, - {6, 0x02, 237}, - {9, 0x02, 237}, - {14, 0x02, 237}, - {20, 0x02, 237}, - {28, 0x02, 237}, - {38, 0x03, 237}, - {3, 0x02, 238}, - {4, 0x02, 238}, - {6, 0x02, 238}, - {9, 0x02, 238}, - {14, 0x02, 238}, - {20, 0x02, 238}, - {28, 0x02, 238}, - {38, 0x03, 238}, -}, -/* 173 */ -{ - {2, 0x02, 239}, - {5, 0x02, 239}, - {13, 0x02, 239}, - {27, 0x03, 239}, - {2, 0x02, 240}, - {5, 0x02, 240}, - {13, 0x02, 240}, - {27, 0x03, 240}, - {2, 0x02, 241}, - {5, 0x02, 241}, - {13, 0x02, 241}, - {27, 0x03, 241}, - {2, 0x02, 242}, - {5, 0x02, 242}, - {13, 0x02, 242}, - {27, 0x03, 242}, -}, -/* 174 */ -{ - {3, 0x02, 239}, - {4, 0x02, 239}, - {6, 0x02, 239}, - {9, 0x02, 239}, - {14, 0x02, 239}, - {20, 0x02, 239}, - {28, 0x02, 239}, - {38, 0x03, 239}, - {3, 0x02, 240}, - {4, 0x02, 240}, - {6, 0x02, 240}, - {9, 0x02, 240}, - {14, 0x02, 240}, - {20, 0x02, 240}, - {28, 0x02, 240}, - {38, 0x03, 240}, -}, -/* 175 */ -{ - {3, 0x02, 241}, - {4, 0x02, 241}, - {6, 0x02, 241}, - {9, 0x02, 241}, - {14, 0x02, 241}, - {20, 0x02, 241}, - {28, 0x02, 241}, - {38, 0x03, 241}, - {3, 0x02, 242}, - {4, 0x02, 242}, - {6, 0x02, 242}, - {9, 0x02, 242}, - {14, 0x02, 242}, - {20, 0x02, 242}, - {28, 0x02, 242}, - {38, 0x03, 242}, -}, -/* 176 */ -{ - {0, 0x03, 243}, - {0, 0x03, 244}, - {0, 0x03, 245}, - {0, 0x03, 246}, - {0, 0x03, 247}, - {0, 0x03, 248}, - {0, 0x03, 249}, - {0, 0x03, 250}, - {0, 0x03, 251}, - {0, 0x03, 252}, - {0, 0x03, 253}, - {0, 0x03, 254}, - {0, 0x03, 255}, - {-1, 0x00, 0}, - {191, 0x00, 0}, - {192, 0x00, 0}, -}, -/* 177 */ -{ - {1, 0x02, 243}, - {12, 0x03, 243}, - {1, 0x02, 244}, - {12, 0x03, 244}, - {1, 0x02, 245}, - {12, 0x03, 245}, - {1, 0x02, 246}, - {12, 0x03, 246}, - {1, 0x02, 247}, - {12, 0x03, 247}, - {1, 0x02, 248}, - {12, 0x03, 248}, - {1, 0x02, 249}, - {12, 0x03, 249}, - {1, 0x02, 250}, - {12, 0x03, 250}, -}, -/* 178 */ -{ - {2, 0x02, 243}, - {5, 0x02, 243}, - {13, 0x02, 243}, - {27, 0x03, 243}, - {2, 0x02, 244}, - {5, 0x02, 244}, - {13, 0x02, 244}, - {27, 0x03, 244}, - {2, 0x02, 245}, - {5, 0x02, 245}, - {13, 0x02, 245}, - {27, 0x03, 245}, - {2, 0x02, 246}, - {5, 0x02, 246}, - {13, 0x02, 246}, - {27, 0x03, 246}, -}, -/* 179 */ -{ - {3, 0x02, 243}, - {4, 0x02, 243}, - {6, 0x02, 243}, - {9, 0x02, 243}, - {14, 0x02, 243}, - {20, 0x02, 243}, - {28, 0x02, 243}, - {38, 0x03, 243}, - {3, 0x02, 244}, - {4, 0x02, 244}, - {6, 0x02, 244}, - {9, 0x02, 244}, - {14, 0x02, 244}, - {20, 0x02, 244}, - {28, 0x02, 244}, - {38, 0x03, 244}, -}, -/* 180 */ -{ - {3, 0x02, 245}, - {4, 0x02, 245}, - {6, 0x02, 245}, - {9, 0x02, 245}, - {14, 0x02, 245}, - {20, 0x02, 245}, - {28, 0x02, 245}, - {38, 0x03, 245}, - {3, 0x02, 246}, - {4, 0x02, 246}, - {6, 0x02, 246}, - {9, 0x02, 246}, - {14, 0x02, 246}, - {20, 0x02, 246}, - {28, 0x02, 246}, - {38, 0x03, 246}, -}, -/* 181 */ -{ - {2, 0x02, 247}, - {5, 0x02, 247}, - {13, 0x02, 247}, - {27, 0x03, 247}, - {2, 0x02, 248}, - {5, 0x02, 248}, - {13, 0x02, 248}, - {27, 0x03, 248}, - {2, 0x02, 249}, - {5, 0x02, 249}, - {13, 0x02, 249}, - {27, 0x03, 249}, - {2, 0x02, 250}, - {5, 0x02, 250}, - {13, 0x02, 250}, - {27, 0x03, 250}, -}, -/* 182 */ -{ - {3, 0x02, 247}, - {4, 0x02, 247}, - {6, 0x02, 247}, - {9, 0x02, 247}, - {14, 0x02, 247}, - {20, 0x02, 247}, - {28, 0x02, 247}, - {38, 0x03, 247}, - {3, 0x02, 248}, - {4, 0x02, 248}, - {6, 0x02, 248}, - {9, 0x02, 248}, - {14, 0x02, 248}, - {20, 0x02, 248}, - {28, 0x02, 248}, - {38, 0x03, 248}, -}, -/* 183 */ -{ - {3, 0x02, 249}, - {4, 0x02, 249}, - {6, 0x02, 249}, - {9, 0x02, 249}, - {14, 0x02, 249}, - {20, 0x02, 249}, - {28, 0x02, 249}, - {38, 0x03, 249}, - {3, 0x02, 250}, - {4, 0x02, 250}, - {6, 0x02, 250}, - {9, 0x02, 250}, - {14, 0x02, 250}, - {20, 0x02, 250}, - {28, 0x02, 250}, - {38, 0x03, 250}, -}, -/* 184 */ -{ - {1, 0x02, 251}, - {12, 0x03, 251}, - {1, 0x02, 252}, - {12, 0x03, 252}, - {1, 0x02, 253}, - {12, 0x03, 253}, - {1, 0x02, 254}, - {12, 0x03, 254}, - {1, 0x02, 255}, - {12, 0x03, 255}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {0, 0x03, 0}, - {0, 0x03, 1}, - {0, 0x03, 2}, - {0, 0x03, 3}, -}, -/* 185 */ -{ - {2, 0x02, 251}, - {5, 0x02, 251}, - {13, 0x02, 251}, - {27, 0x03, 251}, - {2, 0x02, 252}, - {5, 0x02, 252}, - {13, 0x02, 252}, - {27, 0x03, 252}, - {2, 0x02, 253}, - {5, 0x02, 253}, - {13, 0x02, 253}, - {27, 0x03, 253}, - {2, 0x02, 254}, - {5, 0x02, 254}, - {13, 0x02, 254}, - {27, 0x03, 254}, -}, -/* 186 */ -{ - {3, 0x02, 251}, - {4, 0x02, 251}, - {6, 0x02, 251}, - {9, 0x02, 251}, - {14, 0x02, 251}, - {20, 0x02, 251}, - {28, 0x02, 251}, - {38, 0x03, 251}, - {3, 0x02, 252}, - {4, 0x02, 252}, - {6, 0x02, 252}, - {9, 0x02, 252}, - {14, 0x02, 252}, - {20, 0x02, 252}, - {28, 0x02, 252}, - {38, 0x03, 252}, -}, -/* 187 */ -{ - {3, 0x02, 253}, - {4, 0x02, 253}, - {6, 0x02, 253}, - {9, 0x02, 253}, - {14, 0x02, 253}, - {20, 0x02, 253}, - {28, 0x02, 253}, - {38, 0x03, 253}, - {3, 0x02, 254}, - {4, 0x02, 254}, - {6, 0x02, 254}, - {9, 0x02, 254}, - {14, 0x02, 254}, - {20, 0x02, 254}, - {28, 0x02, 254}, - {38, 0x03, 254}, -}, -/* 188 */ -{ - {2, 0x02, 255}, - {5, 0x02, 255}, - {13, 0x02, 255}, - {27, 0x03, 255}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {1, 0x02, 0}, - {12, 0x03, 0}, - {1, 0x02, 1}, - {12, 0x03, 1}, - {1, 0x02, 2}, - {12, 0x03, 2}, - {1, 0x02, 3}, - {12, 0x03, 3}, -}, -/* 189 */ -{ - {3, 0x02, 255}, - {4, 0x02, 255}, - {6, 0x02, 255}, - {9, 0x02, 255}, - {14, 0x02, 255}, - {20, 0x02, 255}, - {28, 0x02, 255}, - {38, 0x03, 255}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, - {-1, 0x00, 0}, -}, -/* 190 */ -{ - {2, 0x02, 0}, - {5, 0x02, 0}, - {13, 0x02, 0}, - {27, 0x03, 0}, - {2, 0x02, 1}, - {5, 0x02, 1}, - {13, 0x02, 1}, - {27, 0x03, 1}, - {2, 0x02, 2}, - {5, 0x02, 2}, - {13, 0x02, 2}, - {27, 0x03, 2}, - {2, 0x02, 3}, - {5, 0x02, 3}, - {13, 0x02, 3}, - {27, 0x03, 3}, -}, -/* 191 */ -{ - {3, 0x02, 0}, - {4, 0x02, 0}, - {6, 0x02, 0}, - {9, 0x02, 0}, - {14, 0x02, 0}, - {20, 0x02, 0}, - {28, 0x02, 0}, - {38, 0x03, 0}, - {3, 0x02, 1}, - {4, 0x02, 1}, - {6, 0x02, 1}, - {9, 0x02, 1}, - {14, 0x02, 1}, - {20, 0x02, 1}, - {28, 0x02, 1}, - {38, 0x03, 1}, -}, -/* 192 */ -{ - {3, 0x02, 2}, - {4, 0x02, 2}, - {6, 0x02, 2}, - {9, 0x02, 2}, - {14, 0x02, 2}, - {20, 0x02, 2}, - {28, 0x02, 2}, - {38, 0x03, 2}, - {3, 0x02, 3}, - {4, 0x02, 3}, - {6, 0x02, 3}, - {9, 0x02, 3}, - {14, 0x02, 3}, - {20, 0x02, 3}, - {28, 0x02, 3}, - {38, 0x03, 3}, -}, -/* 193 */ -{ - {197, 0x00, 0}, - {200, 0x00, 0}, - {204, 0x00, 0}, - {207, 0x00, 0}, - {212, 0x00, 0}, - {215, 0x00, 0}, - {219, 0x00, 0}, - {222, 0x00, 0}, - {228, 0x00, 0}, - {231, 0x00, 0}, - {235, 0x00, 0}, - {238, 0x00, 0}, - {243, 0x00, 0}, - {246, 0x00, 0}, - {250, 0x00, 0}, - {253, 0x00, 0}, -}, -/* 194 */ -{ - {198, 0x00, 0}, - {199, 0x00, 0}, - {201, 0x00, 0}, - {202, 0x00, 0}, - {205, 0x00, 0}, - {206, 0x00, 0}, - {208, 0x00, 0}, - {209, 0x00, 0}, - {213, 0x00, 0}, - {214, 0x00, 0}, - {216, 0x00, 0}, - {217, 0x00, 0}, - {220, 0x00, 0}, - {221, 0x00, 0}, - {223, 0x00, 0}, - {224, 0x00, 0}, -}, -/* 195 */ -{ - {0, 0x03, 4}, - {0, 0x03, 5}, - {0, 0x03, 6}, - {0, 0x03, 7}, - {0, 0x03, 8}, - {0, 0x03, 9}, - {0, 0x03, 10}, - {0, 0x03, 11}, - {0, 0x03, 12}, - {0, 0x03, 13}, - {0, 0x03, 14}, - {0, 0x03, 15}, - {0, 0x03, 16}, - {0, 0x03, 17}, - {0, 0x03, 18}, - {0, 0x03, 19}, -}, -/* 196 */ -{ - {1, 0x02, 4}, - {12, 0x03, 4}, - {1, 0x02, 5}, - {12, 0x03, 5}, - {1, 0x02, 6}, - {12, 0x03, 6}, - {1, 0x02, 7}, - {12, 0x03, 7}, - {1, 0x02, 8}, - {12, 0x03, 8}, - {1, 0x02, 9}, - {12, 0x03, 9}, - {1, 0x02, 10}, - {12, 0x03, 10}, - {1, 0x02, 11}, - {12, 0x03, 11}, -}, -/* 197 */ -{ - {2, 0x02, 4}, - {5, 0x02, 4}, - {13, 0x02, 4}, - {27, 0x03, 4}, - {2, 0x02, 5}, - {5, 0x02, 5}, - {13, 0x02, 5}, - {27, 0x03, 5}, - {2, 0x02, 6}, - {5, 0x02, 6}, - {13, 0x02, 6}, - {27, 0x03, 6}, - {2, 0x02, 7}, - {5, 0x02, 7}, - {13, 0x02, 7}, - {27, 0x03, 7}, -}, -/* 198 */ -{ - {3, 0x02, 4}, - {4, 0x02, 4}, - {6, 0x02, 4}, - {9, 0x02, 4}, - {14, 0x02, 4}, - {20, 0x02, 4}, - {28, 0x02, 4}, - {38, 0x03, 4}, - {3, 0x02, 5}, - {4, 0x02, 5}, - {6, 0x02, 5}, - {9, 0x02, 5}, - {14, 0x02, 5}, - {20, 0x02, 5}, - {28, 0x02, 5}, - {38, 0x03, 5}, -}, -/* 199 */ -{ - {3, 0x02, 6}, - {4, 0x02, 6}, - {6, 0x02, 6}, - {9, 0x02, 6}, - {14, 0x02, 6}, - {20, 0x02, 6}, - {28, 0x02, 6}, - {38, 0x03, 6}, - {3, 0x02, 7}, - {4, 0x02, 7}, - {6, 0x02, 7}, - {9, 0x02, 7}, - {14, 0x02, 7}, - {20, 0x02, 7}, - {28, 0x02, 7}, - {38, 0x03, 7}, -}, -/* 200 */ -{ - {2, 0x02, 8}, - {5, 0x02, 8}, - {13, 0x02, 8}, - {27, 0x03, 8}, - {2, 0x02, 9}, - {5, 0x02, 9}, - {13, 0x02, 9}, - {27, 0x03, 9}, - {2, 0x02, 10}, - {5, 0x02, 10}, - {13, 0x02, 10}, - {27, 0x03, 10}, - {2, 0x02, 11}, - {5, 0x02, 11}, - {13, 0x02, 11}, - {27, 0x03, 11}, -}, -/* 201 */ -{ - {3, 0x02, 8}, - {4, 0x02, 8}, - {6, 0x02, 8}, - {9, 0x02, 8}, - {14, 0x02, 8}, - {20, 0x02, 8}, - {28, 0x02, 8}, - {38, 0x03, 8}, - {3, 0x02, 9}, - {4, 0x02, 9}, - {6, 0x02, 9}, - {9, 0x02, 9}, - {14, 0x02, 9}, - {20, 0x02, 9}, - {28, 0x02, 9}, - {38, 0x03, 9}, -}, -/* 202 */ -{ - {3, 0x02, 10}, - {4, 0x02, 10}, - {6, 0x02, 10}, - {9, 0x02, 10}, - {14, 0x02, 10}, - {20, 0x02, 10}, - {28, 0x02, 10}, - {38, 0x03, 10}, - {3, 0x02, 11}, - {4, 0x02, 11}, - {6, 0x02, 11}, - {9, 0x02, 11}, - {14, 0x02, 11}, - {20, 0x02, 11}, - {28, 0x02, 11}, - {38, 0x03, 11}, -}, -/* 203 */ -{ - {1, 0x02, 12}, - {12, 0x03, 12}, - {1, 0x02, 13}, - {12, 0x03, 13}, - {1, 0x02, 14}, - {12, 0x03, 14}, - {1, 0x02, 15}, - {12, 0x03, 15}, - {1, 0x02, 16}, - {12, 0x03, 16}, - {1, 0x02, 17}, - {12, 0x03, 17}, - {1, 0x02, 18}, - {12, 0x03, 18}, - {1, 0x02, 19}, - {12, 0x03, 19}, -}, -/* 204 */ -{ - {2, 0x02, 12}, - {5, 0x02, 12}, - {13, 0x02, 12}, - {27, 0x03, 12}, - {2, 0x02, 13}, - {5, 0x02, 13}, - {13, 0x02, 13}, - {27, 0x03, 13}, - {2, 0x02, 14}, - {5, 0x02, 14}, - {13, 0x02, 14}, - {27, 0x03, 14}, - {2, 0x02, 15}, - {5, 0x02, 15}, - {13, 0x02, 15}, - {27, 0x03, 15}, -}, -/* 205 */ -{ - {3, 0x02, 12}, - {4, 0x02, 12}, - {6, 0x02, 12}, - {9, 0x02, 12}, - {14, 0x02, 12}, - {20, 0x02, 12}, - {28, 0x02, 12}, - {38, 0x03, 12}, - {3, 0x02, 13}, - {4, 0x02, 13}, - {6, 0x02, 13}, - {9, 0x02, 13}, - {14, 0x02, 13}, - {20, 0x02, 13}, - {28, 0x02, 13}, - {38, 0x03, 13}, -}, -/* 206 */ -{ - {3, 0x02, 14}, - {4, 0x02, 14}, - {6, 0x02, 14}, - {9, 0x02, 14}, - {14, 0x02, 14}, - {20, 0x02, 14}, - {28, 0x02, 14}, - {38, 0x03, 14}, - {3, 0x02, 15}, - {4, 0x02, 15}, - {6, 0x02, 15}, - {9, 0x02, 15}, - {14, 0x02, 15}, - {20, 0x02, 15}, - {28, 0x02, 15}, - {38, 0x03, 15}, -}, -/* 207 */ -{ - {2, 0x02, 16}, - {5, 0x02, 16}, - {13, 0x02, 16}, - {27, 0x03, 16}, - {2, 0x02, 17}, - {5, 0x02, 17}, - {13, 0x02, 17}, - {27, 0x03, 17}, - {2, 0x02, 18}, - {5, 0x02, 18}, - {13, 0x02, 18}, - {27, 0x03, 18}, - {2, 0x02, 19}, - {5, 0x02, 19}, - {13, 0x02, 19}, - {27, 0x03, 19}, -}, -/* 208 */ -{ - {3, 0x02, 16}, - {4, 0x02, 16}, - {6, 0x02, 16}, - {9, 0x02, 16}, - {14, 0x02, 16}, - {20, 0x02, 16}, - {28, 0x02, 16}, - {38, 0x03, 16}, - {3, 0x02, 17}, - {4, 0x02, 17}, - {6, 0x02, 17}, - {9, 0x02, 17}, - {14, 0x02, 17}, - {20, 0x02, 17}, - {28, 0x02, 17}, - {38, 0x03, 17}, -}, -/* 209 */ -{ - {3, 0x02, 18}, - {4, 0x02, 18}, - {6, 0x02, 18}, - {9, 0x02, 18}, - {14, 0x02, 18}, - {20, 0x02, 18}, - {28, 0x02, 18}, - {38, 0x03, 18}, - {3, 0x02, 19}, - {4, 0x02, 19}, - {6, 0x02, 19}, - {9, 0x02, 19}, - {14, 0x02, 19}, - {20, 0x02, 19}, - {28, 0x02, 19}, - {38, 0x03, 19}, -}, -/* 210 */ -{ - {0, 0x03, 20}, - {0, 0x03, 21}, - {0, 0x03, 22}, - {0, 0x03, 23}, - {0, 0x03, 24}, - {0, 0x03, 25}, - {0, 0x03, 26}, - {0, 0x03, 27}, - {0, 0x03, 28}, - {0, 0x03, 29}, - {0, 0x03, 30}, - {0, 0x03, 31}, - {0, 0x03, 127}, - {0, 0x03, 128}, - {0, 0x03, 129}, - {0, 0x03, 130}, -}, -/* 211 */ -{ - {1, 0x02, 20}, - {12, 0x03, 20}, - {1, 0x02, 21}, - {12, 0x03, 21}, - {1, 0x02, 22}, - {12, 0x03, 22}, - {1, 0x02, 23}, - {12, 0x03, 23}, - {1, 0x02, 24}, - {12, 0x03, 24}, - {1, 0x02, 25}, - {12, 0x03, 25}, - {1, 0x02, 26}, - {12, 0x03, 26}, - {1, 0x02, 27}, - {12, 0x03, 27}, -}, -/* 212 */ -{ - {2, 0x02, 20}, - {5, 0x02, 20}, - {13, 0x02, 20}, - {27, 0x03, 20}, - {2, 0x02, 21}, - {5, 0x02, 21}, - {13, 0x02, 21}, - {27, 0x03, 21}, - {2, 0x02, 22}, - {5, 0x02, 22}, - {13, 0x02, 22}, - {27, 0x03, 22}, - {2, 0x02, 23}, - {5, 0x02, 23}, - {13, 0x02, 23}, - {27, 0x03, 23}, -}, -/* 213 */ -{ - {3, 0x02, 20}, - {4, 0x02, 20}, - {6, 0x02, 20}, - {9, 0x02, 20}, - {14, 0x02, 20}, - {20, 0x02, 20}, - {28, 0x02, 20}, - {38, 0x03, 20}, - {3, 0x02, 21}, - {4, 0x02, 21}, - {6, 0x02, 21}, - {9, 0x02, 21}, - {14, 0x02, 21}, - {20, 0x02, 21}, - {28, 0x02, 21}, - {38, 0x03, 21}, -}, -/* 214 */ -{ - {3, 0x02, 22}, - {4, 0x02, 22}, - {6, 0x02, 22}, - {9, 0x02, 22}, - {14, 0x02, 22}, - {20, 0x02, 22}, - {28, 0x02, 22}, - {38, 0x03, 22}, - {3, 0x02, 23}, - {4, 0x02, 23}, - {6, 0x02, 23}, - {9, 0x02, 23}, - {14, 0x02, 23}, - {20, 0x02, 23}, - {28, 0x02, 23}, - {38, 0x03, 23}, -}, -/* 215 */ -{ - {2, 0x02, 24}, - {5, 0x02, 24}, - {13, 0x02, 24}, - {27, 0x03, 24}, - {2, 0x02, 25}, - {5, 0x02, 25}, - {13, 0x02, 25}, - {27, 0x03, 25}, - {2, 0x02, 26}, - {5, 0x02, 26}, - {13, 0x02, 26}, - {27, 0x03, 26}, - {2, 0x02, 27}, - {5, 0x02, 27}, - {13, 0x02, 27}, - {27, 0x03, 27}, -}, -/* 216 */ -{ - {3, 0x02, 24}, - {4, 0x02, 24}, - {6, 0x02, 24}, - {9, 0x02, 24}, - {14, 0x02, 24}, - {20, 0x02, 24}, - {28, 0x02, 24}, - {38, 0x03, 24}, - {3, 0x02, 25}, - {4, 0x02, 25}, - {6, 0x02, 25}, - {9, 0x02, 25}, - {14, 0x02, 25}, - {20, 0x02, 25}, - {28, 0x02, 25}, - {38, 0x03, 25}, -}, -/* 217 */ -{ - {3, 0x02, 26}, - {4, 0x02, 26}, - {6, 0x02, 26}, - {9, 0x02, 26}, - {14, 0x02, 26}, - {20, 0x02, 26}, - {28, 0x02, 26}, - {38, 0x03, 26}, - {3, 0x02, 27}, - {4, 0x02, 27}, - {6, 0x02, 27}, - {9, 0x02, 27}, - {14, 0x02, 27}, - {20, 0x02, 27}, - {28, 0x02, 27}, - {38, 0x03, 27}, -}, -/* 218 */ -{ - {1, 0x02, 28}, - {12, 0x03, 28}, - {1, 0x02, 29}, - {12, 0x03, 29}, - {1, 0x02, 30}, - {12, 0x03, 30}, - {1, 0x02, 31}, - {12, 0x03, 31}, - {1, 0x02, 127}, - {12, 0x03, 127}, - {1, 0x02, 128}, - {12, 0x03, 128}, - {1, 0x02, 129}, - {12, 0x03, 129}, - {1, 0x02, 130}, - {12, 0x03, 130}, -}, -/* 219 */ -{ - {2, 0x02, 28}, - {5, 0x02, 28}, - {13, 0x02, 28}, - {27, 0x03, 28}, - {2, 0x02, 29}, - {5, 0x02, 29}, - {13, 0x02, 29}, - {27, 0x03, 29}, - {2, 0x02, 30}, - {5, 0x02, 30}, - {13, 0x02, 30}, - {27, 0x03, 30}, - {2, 0x02, 31}, - {5, 0x02, 31}, - {13, 0x02, 31}, - {27, 0x03, 31}, -}, -/* 220 */ -{ - {3, 0x02, 28}, - {4, 0x02, 28}, - {6, 0x02, 28}, - {9, 0x02, 28}, - {14, 0x02, 28}, - {20, 0x02, 28}, - {28, 0x02, 28}, - {38, 0x03, 28}, - {3, 0x02, 29}, - {4, 0x02, 29}, - {6, 0x02, 29}, - {9, 0x02, 29}, - {14, 0x02, 29}, - {20, 0x02, 29}, - {28, 0x02, 29}, - {38, 0x03, 29}, -}, -/* 221 */ -{ - {3, 0x02, 30}, - {4, 0x02, 30}, - {6, 0x02, 30}, - {9, 0x02, 30}, - {14, 0x02, 30}, - {20, 0x02, 30}, - {28, 0x02, 30}, - {38, 0x03, 30}, - {3, 0x02, 31}, - {4, 0x02, 31}, - {6, 0x02, 31}, - {9, 0x02, 31}, - {14, 0x02, 31}, - {20, 0x02, 31}, - {28, 0x02, 31}, - {38, 0x03, 31}, -}, -/* 222 */ -{ - {2, 0x02, 127}, - {5, 0x02, 127}, - {13, 0x02, 127}, - {27, 0x03, 127}, - {2, 0x02, 128}, - {5, 0x02, 128}, - {13, 0x02, 128}, - {27, 0x03, 128}, - {2, 0x02, 129}, - {5, 0x02, 129}, - {13, 0x02, 129}, - {27, 0x03, 129}, - {2, 0x02, 130}, - {5, 0x02, 130}, - {13, 0x02, 130}, - {27, 0x03, 130}, -}, -/* 223 */ -{ - {3, 0x02, 127}, - {4, 0x02, 127}, - {6, 0x02, 127}, - {9, 0x02, 127}, - {14, 0x02, 127}, - {20, 0x02, 127}, - {28, 0x02, 127}, - {38, 0x03, 127}, - {3, 0x02, 128}, - {4, 0x02, 128}, - {6, 0x02, 128}, - {9, 0x02, 128}, - {14, 0x02, 128}, - {20, 0x02, 128}, - {28, 0x02, 128}, - {38, 0x03, 128}, -}, -/* 224 */ -{ - {3, 0x02, 129}, - {4, 0x02, 129}, - {6, 0x02, 129}, - {9, 0x02, 129}, - {14, 0x02, 129}, - {20, 0x02, 129}, - {28, 0x02, 129}, - {38, 0x03, 129}, - {3, 0x02, 130}, - {4, 0x02, 130}, - {6, 0x02, 130}, - {9, 0x02, 130}, - {14, 0x02, 130}, - {20, 0x02, 130}, - {28, 0x02, 130}, - {38, 0x03, 130}, -}, -/* 225 */ -{ - {229, 0x00, 0}, - {230, 0x00, 0}, - {232, 0x00, 0}, - {233, 0x00, 0}, - {236, 0x00, 0}, - {237, 0x00, 0}, - {239, 0x00, 0}, - {240, 0x00, 0}, - {244, 0x00, 0}, - {245, 0x00, 0}, - {247, 0x00, 0}, - {248, 0x00, 0}, - {251, 0x00, 0}, - {252, 0x00, 0}, - {254, 0x00, 0}, - {255, 0x00, 0}, -}, -/* 226 */ -{ - {0, 0x03, 131}, - {0, 0x03, 132}, - {0, 0x03, 133}, - {0, 0x03, 134}, - {0, 0x03, 135}, - {0, 0x03, 136}, - {0, 0x03, 137}, - {0, 0x03, 138}, - {0, 0x03, 139}, - {0, 0x03, 140}, - {0, 0x03, 141}, - {0, 0x03, 142}, - {0, 0x03, 143}, - {0, 0x03, 144}, - {0, 0x03, 145}, - {0, 0x03, 146}, -}, -/* 227 */ -{ - {1, 0x02, 131}, - {12, 0x03, 131}, - {1, 0x02, 132}, - {12, 0x03, 132}, - {1, 0x02, 133}, - {12, 0x03, 133}, - {1, 0x02, 134}, - {12, 0x03, 134}, - {1, 0x02, 135}, - {12, 0x03, 135}, - {1, 0x02, 136}, - {12, 0x03, 136}, - {1, 0x02, 137}, - {12, 0x03, 137}, - {1, 0x02, 138}, - {12, 0x03, 138}, -}, -/* 228 */ -{ - {2, 0x02, 131}, - {5, 0x02, 131}, - {13, 0x02, 131}, - {27, 0x03, 131}, - {2, 0x02, 132}, - {5, 0x02, 132}, - {13, 0x02, 132}, - {27, 0x03, 132}, - {2, 0x02, 133}, - {5, 0x02, 133}, - {13, 0x02, 133}, - {27, 0x03, 133}, - {2, 0x02, 134}, - {5, 0x02, 134}, - {13, 0x02, 134}, - {27, 0x03, 134}, -}, -/* 229 */ -{ - {3, 0x02, 131}, - {4, 0x02, 131}, - {6, 0x02, 131}, - {9, 0x02, 131}, - {14, 0x02, 131}, - {20, 0x02, 131}, - {28, 0x02, 131}, - {38, 0x03, 131}, - {3, 0x02, 132}, - {4, 0x02, 132}, - {6, 0x02, 132}, - {9, 0x02, 132}, - {14, 0x02, 132}, - {20, 0x02, 132}, - {28, 0x02, 132}, - {38, 0x03, 132}, -}, -/* 230 */ -{ - {3, 0x02, 133}, - {4, 0x02, 133}, - {6, 0x02, 133}, - {9, 0x02, 133}, - {14, 0x02, 133}, - {20, 0x02, 133}, - {28, 0x02, 133}, - {38, 0x03, 133}, - {3, 0x02, 134}, - {4, 0x02, 134}, - {6, 0x02, 134}, - {9, 0x02, 134}, - {14, 0x02, 134}, - {20, 0x02, 134}, - {28, 0x02, 134}, - {38, 0x03, 134}, -}, -/* 231 */ -{ - {2, 0x02, 135}, - {5, 0x02, 135}, - {13, 0x02, 135}, - {27, 0x03, 135}, - {2, 0x02, 136}, - {5, 0x02, 136}, - {13, 0x02, 136}, - {27, 0x03, 136}, - {2, 0x02, 137}, - {5, 0x02, 137}, - {13, 0x02, 137}, - {27, 0x03, 137}, - {2, 0x02, 138}, - {5, 0x02, 138}, - {13, 0x02, 138}, - {27, 0x03, 138}, -}, -/* 232 */ -{ - {3, 0x02, 135}, - {4, 0x02, 135}, - {6, 0x02, 135}, - {9, 0x02, 135}, - {14, 0x02, 135}, - {20, 0x02, 135}, - {28, 0x02, 135}, - {38, 0x03, 135}, - {3, 0x02, 136}, - {4, 0x02, 136}, - {6, 0x02, 136}, - {9, 0x02, 136}, - {14, 0x02, 136}, - {20, 0x02, 136}, - {28, 0x02, 136}, - {38, 0x03, 136}, -}, -/* 233 */ -{ - {3, 0x02, 137}, - {4, 0x02, 137}, - {6, 0x02, 137}, - {9, 0x02, 137}, - {14, 0x02, 137}, - {20, 0x02, 137}, - {28, 0x02, 137}, - {38, 0x03, 137}, - {3, 0x02, 138}, - {4, 0x02, 138}, - {6, 0x02, 138}, - {9, 0x02, 138}, - {14, 0x02, 138}, - {20, 0x02, 138}, - {28, 0x02, 138}, - {38, 0x03, 138}, -}, -/* 234 */ -{ - {1, 0x02, 139}, - {12, 0x03, 139}, - {1, 0x02, 140}, - {12, 0x03, 140}, - {1, 0x02, 141}, - {12, 0x03, 141}, - {1, 0x02, 142}, - {12, 0x03, 142}, - {1, 0x02, 143}, - {12, 0x03, 143}, - {1, 0x02, 144}, - {12, 0x03, 144}, - {1, 0x02, 145}, - {12, 0x03, 145}, - {1, 0x02, 146}, - {12, 0x03, 146}, -}, -/* 235 */ -{ - {2, 0x02, 139}, - {5, 0x02, 139}, - {13, 0x02, 139}, - {27, 0x03, 139}, - {2, 0x02, 140}, - {5, 0x02, 140}, - {13, 0x02, 140}, - {27, 0x03, 140}, - {2, 0x02, 141}, - {5, 0x02, 141}, - {13, 0x02, 141}, - {27, 0x03, 141}, - {2, 0x02, 142}, - {5, 0x02, 142}, - {13, 0x02, 142}, - {27, 0x03, 142}, -}, -/* 236 */ -{ - {3, 0x02, 139}, - {4, 0x02, 139}, - {6, 0x02, 139}, - {9, 0x02, 139}, - {14, 0x02, 139}, - {20, 0x02, 139}, - {28, 0x02, 139}, - {38, 0x03, 139}, - {3, 0x02, 140}, - {4, 0x02, 140}, - {6, 0x02, 140}, - {9, 0x02, 140}, - {14, 0x02, 140}, - {20, 0x02, 140}, - {28, 0x02, 140}, - {38, 0x03, 140}, -}, -/* 237 */ -{ - {3, 0x02, 141}, - {4, 0x02, 141}, - {6, 0x02, 141}, - {9, 0x02, 141}, - {14, 0x02, 141}, - {20, 0x02, 141}, - {28, 0x02, 141}, - {38, 0x03, 141}, - {3, 0x02, 142}, - {4, 0x02, 142}, - {6, 0x02, 142}, - {9, 0x02, 142}, - {14, 0x02, 142}, - {20, 0x02, 142}, - {28, 0x02, 142}, - {38, 0x03, 142}, -}, -/* 238 */ -{ - {2, 0x02, 143}, - {5, 0x02, 143}, - {13, 0x02, 143}, - {27, 0x03, 143}, - {2, 0x02, 144}, - {5, 0x02, 144}, - {13, 0x02, 144}, - {27, 0x03, 144}, - {2, 0x02, 145}, - {5, 0x02, 145}, - {13, 0x02, 145}, - {27, 0x03, 145}, - {2, 0x02, 146}, - {5, 0x02, 146}, - {13, 0x02, 146}, - {27, 0x03, 146}, -}, -/* 239 */ -{ - {3, 0x02, 143}, - {4, 0x02, 143}, - {6, 0x02, 143}, - {9, 0x02, 143}, - {14, 0x02, 143}, - {20, 0x02, 143}, - {28, 0x02, 143}, - {38, 0x03, 143}, - {3, 0x02, 144}, - {4, 0x02, 144}, - {6, 0x02, 144}, - {9, 0x02, 144}, - {14, 0x02, 144}, - {20, 0x02, 144}, - {28, 0x02, 144}, - {38, 0x03, 144}, -}, -/* 240 */ -{ - {3, 0x02, 145}, - {4, 0x02, 145}, - {6, 0x02, 145}, - {9, 0x02, 145}, - {14, 0x02, 145}, - {20, 0x02, 145}, - {28, 0x02, 145}, - {38, 0x03, 145}, - {3, 0x02, 146}, - {4, 0x02, 146}, - {6, 0x02, 146}, - {9, 0x02, 146}, - {14, 0x02, 146}, - {20, 0x02, 146}, - {28, 0x02, 146}, - {38, 0x03, 146}, -}, -/* 241 */ -{ - {0, 0x03, 147}, - {0, 0x03, 148}, - {0, 0x03, 149}, - {0, 0x03, 150}, - {0, 0x03, 151}, - {0, 0x03, 152}, - {0, 0x03, 153}, - {0, 0x03, 154}, - {0, 0x03, 155}, - {0, 0x03, 156}, - {0, 0x03, 157}, - {0, 0x03, 158}, - {0, 0x03, 159}, - {0, 0x03, 160}, - {0, 0x03, 161}, - {0, 0x03, 162}, -}, -/* 242 */ -{ - {1, 0x02, 147}, - {12, 0x03, 147}, - {1, 0x02, 148}, - {12, 0x03, 148}, - {1, 0x02, 149}, - {12, 0x03, 149}, - {1, 0x02, 150}, - {12, 0x03, 150}, - {1, 0x02, 151}, - {12, 0x03, 151}, - {1, 0x02, 152}, - {12, 0x03, 152}, - {1, 0x02, 153}, - {12, 0x03, 153}, - {1, 0x02, 154}, - {12, 0x03, 154}, -}, -/* 243 */ -{ - {2, 0x02, 147}, - {5, 0x02, 147}, - {13, 0x02, 147}, - {27, 0x03, 147}, - {2, 0x02, 148}, - {5, 0x02, 148}, - {13, 0x02, 148}, - {27, 0x03, 148}, - {2, 0x02, 149}, - {5, 0x02, 149}, - {13, 0x02, 149}, - {27, 0x03, 149}, - {2, 0x02, 150}, - {5, 0x02, 150}, - {13, 0x02, 150}, - {27, 0x03, 150}, -}, -/* 244 */ -{ - {3, 0x02, 147}, - {4, 0x02, 147}, - {6, 0x02, 147}, - {9, 0x02, 147}, - {14, 0x02, 147}, - {20, 0x02, 147}, - {28, 0x02, 147}, - {38, 0x03, 147}, - {3, 0x02, 148}, - {4, 0x02, 148}, - {6, 0x02, 148}, - {9, 0x02, 148}, - {14, 0x02, 148}, - {20, 0x02, 148}, - {28, 0x02, 148}, - {38, 0x03, 148}, -}, -/* 245 */ -{ - {3, 0x02, 149}, - {4, 0x02, 149}, - {6, 0x02, 149}, - {9, 0x02, 149}, - {14, 0x02, 149}, - {20, 0x02, 149}, - {28, 0x02, 149}, - {38, 0x03, 149}, - {3, 0x02, 150}, - {4, 0x02, 150}, - {6, 0x02, 150}, - {9, 0x02, 150}, - {14, 0x02, 150}, - {20, 0x02, 150}, - {28, 0x02, 150}, - {38, 0x03, 150}, -}, -/* 246 */ -{ - {2, 0x02, 151}, - {5, 0x02, 151}, - {13, 0x02, 151}, - {27, 0x03, 151}, - {2, 0x02, 152}, - {5, 0x02, 152}, - {13, 0x02, 152}, - {27, 0x03, 152}, - {2, 0x02, 153}, - {5, 0x02, 153}, - {13, 0x02, 153}, - {27, 0x03, 153}, - {2, 0x02, 154}, - {5, 0x02, 154}, - {13, 0x02, 154}, - {27, 0x03, 154}, -}, -/* 247 */ -{ - {3, 0x02, 151}, - {4, 0x02, 151}, - {6, 0x02, 151}, - {9, 0x02, 151}, - {14, 0x02, 151}, - {20, 0x02, 151}, - {28, 0x02, 151}, - {38, 0x03, 151}, - {3, 0x02, 152}, - {4, 0x02, 152}, - {6, 0x02, 152}, - {9, 0x02, 152}, - {14, 0x02, 152}, - {20, 0x02, 152}, - {28, 0x02, 152}, - {38, 0x03, 152}, -}, -/* 248 */ -{ - {3, 0x02, 153}, - {4, 0x02, 153}, - {6, 0x02, 153}, - {9, 0x02, 153}, - {14, 0x02, 153}, - {20, 0x02, 153}, - {28, 0x02, 153}, - {38, 0x03, 153}, - {3, 0x02, 154}, - {4, 0x02, 154}, - {6, 0x02, 154}, - {9, 0x02, 154}, - {14, 0x02, 154}, - {20, 0x02, 154}, - {28, 0x02, 154}, - {38, 0x03, 154}, -}, -/* 249 */ -{ - {1, 0x02, 155}, - {12, 0x03, 155}, - {1, 0x02, 156}, - {12, 0x03, 156}, - {1, 0x02, 157}, - {12, 0x03, 157}, - {1, 0x02, 158}, - {12, 0x03, 158}, - {1, 0x02, 159}, - {12, 0x03, 159}, - {1, 0x02, 160}, - {12, 0x03, 160}, - {1, 0x02, 161}, - {12, 0x03, 161}, - {1, 0x02, 162}, - {12, 0x03, 162}, -}, -/* 250 */ -{ - {2, 0x02, 155}, - {5, 0x02, 155}, - {13, 0x02, 155}, - {27, 0x03, 155}, - {2, 0x02, 156}, - {5, 0x02, 156}, - {13, 0x02, 156}, - {27, 0x03, 156}, - {2, 0x02, 157}, - {5, 0x02, 157}, - {13, 0x02, 157}, - {27, 0x03, 157}, - {2, 0x02, 158}, - {5, 0x02, 158}, - {13, 0x02, 158}, - {27, 0x03, 158}, -}, -/* 251 */ -{ - {3, 0x02, 155}, - {4, 0x02, 155}, - {6, 0x02, 155}, - {9, 0x02, 155}, - {14, 0x02, 155}, - {20, 0x02, 155}, - {28, 0x02, 155}, - {38, 0x03, 155}, - {3, 0x02, 156}, - {4, 0x02, 156}, - {6, 0x02, 156}, - {9, 0x02, 156}, - {14, 0x02, 156}, - {20, 0x02, 156}, - {28, 0x02, 156}, - {38, 0x03, 156}, -}, -/* 252 */ -{ - {3, 0x02, 157}, - {4, 0x02, 157}, - {6, 0x02, 157}, - {9, 0x02, 157}, - {14, 0x02, 157}, - {20, 0x02, 157}, - {28, 0x02, 157}, - {38, 0x03, 157}, - {3, 0x02, 158}, - {4, 0x02, 158}, - {6, 0x02, 158}, - {9, 0x02, 158}, - {14, 0x02, 158}, - {20, 0x02, 158}, - {28, 0x02, 158}, - {38, 0x03, 158}, -}, -/* 253 */ -{ - {2, 0x02, 159}, - {5, 0x02, 159}, - {13, 0x02, 159}, - {27, 0x03, 159}, - {2, 0x02, 160}, - {5, 0x02, 160}, - {13, 0x02, 160}, - {27, 0x03, 160}, - {2, 0x02, 161}, - {5, 0x02, 161}, - {13, 0x02, 161}, - {27, 0x03, 161}, - {2, 0x02, 162}, - {5, 0x02, 162}, - {13, 0x02, 162}, - {27, 0x03, 162}, -}, -/* 254 */ -{ - {3, 0x02, 159}, - {4, 0x02, 159}, - {6, 0x02, 159}, - {9, 0x02, 159}, - {14, 0x02, 159}, - {20, 0x02, 159}, - {28, 0x02, 159}, - {38, 0x03, 159}, - {3, 0x02, 160}, - {4, 0x02, 160}, - {6, 0x02, 160}, - {9, 0x02, 160}, - {14, 0x02, 160}, - {20, 0x02, 160}, - {28, 0x02, 160}, - {38, 0x03, 160}, -}, -/* 255 */ -{ - {3, 0x02, 161}, - {4, 0x02, 161}, - {6, 0x02, 161}, - {9, 0x02, 161}, - {14, 0x02, 161}, - {20, 0x02, 161}, - {28, 0x02, 161}, - {38, 0x03, 161}, - {3, 0x02, 162}, - {4, 0x02, 162}, - {6, 0x02, 162}, - {9, 0x02, 162}, - {14, 0x02, 162}, - {20, 0x02, 162}, - {28, 0x02, 162}, - {38, 0x03, 162}, -}, -}; diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 8e3064fa..00c4e65f 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -201,7 +201,7 @@ static int nghttp2_session_new(nghttp2_session **session_ptr, const nghttp2_opt_set *opt_set) { int r; - nghttp2_hd_side side_deflate, side_inflate; + *session_ptr = malloc(sizeof(nghttp2_session)); if(*session_ptr == NULL) { r = NGHTTP2_ERR_NOMEM; @@ -236,17 +236,12 @@ static int nghttp2_session_new(nghttp2_session **session_ptr, if(server) { (*session_ptr)->server = 1; - side_deflate = NGHTTP2_HD_SIDE_RESPONSE; - side_inflate = NGHTTP2_HD_SIDE_REQUEST; - } else { - side_deflate = NGHTTP2_HD_SIDE_REQUEST; - side_inflate = NGHTTP2_HD_SIDE_RESPONSE; } - r = nghttp2_hd_deflate_init(&(*session_ptr)->hd_deflater, side_deflate); + r = nghttp2_hd_deflate_init(&(*session_ptr)->hd_deflater); if(r != 0) { goto fail_hd_deflater; } - r = nghttp2_hd_inflate_init(&(*session_ptr)->hd_inflater, side_inflate); + r = nghttp2_hd_inflate_init(&(*session_ptr)->hd_inflater); if(r != 0) { goto fail_hd_inflater; } @@ -2708,8 +2703,8 @@ int nghttp2_session_update_local_settings(nghttp2_session *session, header_table_size > NGHTTP2_MAX_HEADER_TABLE_SIZE) { return NGHTTP2_ERR_HEADER_COMP; } - rv = nghttp2_hd_change_table_size(&session->hd_inflater.ctx, - header_table_size); + rv = nghttp2_hd_inflate_change_table_size(&session->hd_inflater, + header_table_size); if(rv != 0) { return rv; } @@ -2791,8 +2786,8 @@ int nghttp2_session_on_settings_received(nghttp2_session *session, return nghttp2_session_handle_invalid_connection (session, frame, NGHTTP2_COMPRESSION_ERROR); } - rv = nghttp2_hd_change_table_size(&session->hd_deflater.ctx, - entry->value); + rv = nghttp2_hd_deflate_change_table_size(&session->hd_deflater, + entry->value); if(rv != 0) { if(nghttp2_is_fatal(rv)) { return rv; diff --git a/python/cnghttp2.pxd b/python/cnghttp2.pxd index 5089bec4..c57c788f 100644 --- a/python/cnghttp2.pxd +++ b/python/cnghttp2.pxd @@ -45,10 +45,6 @@ cdef extern from 'nghttp2_hd.h': # This is macro int NGHTTP2_HD_ENTRY_OVERHEAD - ctypedef enum nghttp2_hd_side: - NGHTTP2_HD_SIDE_REQUEST - NGHTTP2_HD_SIDE_RESPONSE - ctypedef enum nghttp2_hd_flags: NGHTTP2_HD_FLAG_REFSET @@ -73,12 +69,9 @@ cdef extern from 'nghttp2_hd.h': nghttp2_hd_context ctx int nghttp2_hd_deflate_init2(nghttp2_hd_deflater *deflater, - nghttp2_hd_side side, size_t deflate_hd_table_bufsize_max) - int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater, - nghttp2_hd_side side) - + int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater) void nghttp2_hd_deflate_free(nghttp2_hd_deflater *deflater) @@ -87,8 +80,11 @@ cdef extern from 'nghttp2_hd.h': void nghttp2_hd_deflate_set_no_refset(nghttp2_hd_deflater *deflater, uint8_t no_refset) - int nghttp2_hd_change_table_size(nghttp2_hd_context *context, - size_t hd_table_bufsize_max) + int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater, + size_t hd_table_bufsize_max) + + int nghttp2_hd_inflate_change_table_size(nghttp2_hd_inflater *inflater, + size_t hd_table_bufsize_max) ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, uint8_t **buf_ptr, size_t *buflen_ptr, diff --git a/python/hpackcheck.py b/python/hpackcheck.py index a2b256ad..09fb71c8 100755 --- a/python/hpackcheck.py +++ b/python/hpackcheck.py @@ -13,12 +13,7 @@ from binascii import a2b_hex import nghttp2 def testsuite(testdata): - if testdata['context'] == 'request': - side = nghttp2.HD_SIDE_REQUEST - else: - side = nghttp2.HD_SIDE_RESPONSE - - inflater = nghttp2.HDInflater(side) + inflater = nghttp2.HDInflater() for casenum, item in enumerate(testdata['cases']): if 'header_table_size' in item: @@ -47,7 +42,7 @@ def testsuite(testdata): if __name__ == '__main__': for filename in sys.argv[1:]: - sys.stderr.write('{}\n'.format(filename)) + sys.stderr.write('{}: '.format(filename)) with open(filename) as f: input = f.read() testsuite(json.loads(input)) diff --git a/python/hpackmake.py b/python/hpackmake.py index 498c6ebb..e3c8cc6c 100755 --- a/python/hpackmake.py +++ b/python/hpackmake.py @@ -14,11 +14,6 @@ from binascii import b2a_hex import nghttp2 def testsuite(testdata, filename, outdir, table_size, deflate_table_size): - if testdata['context'] == 'request': - side = nghttp2.HD_SIDE_REQUEST - else: - side = nghttp2.HD_SIDE_RESPONSE - res = { 'draft':5, 'context': testdata['context'], 'description': '''\ @@ -29,7 +24,7 @@ original. We make some headers not indexing at all, but this does not always \ result in less bits on the wire.''' } cases = [] - deflater = nghttp2.HDDeflater(side, deflate_table_size) + deflater = nghttp2.HDDeflater(deflate_table_size) deflater.change_table_size(table_size) for casenum, item in enumerate(testdata['cases']): outitem = { diff --git a/python/nghttp2.pyx b/python/nghttp2.pyx index 7580c2fe..6f86a832 100644 --- a/python/nghttp2.pyx +++ b/python/nghttp2.pyx @@ -26,9 +26,6 @@ from libc.stdlib cimport malloc, free from libc.string cimport memcpy, memset from libc.stdint cimport uint8_t, uint16_t, uint32_t, int32_t -HD_SIDE_REQUEST = cnghttp2.NGHTTP2_HD_SIDE_REQUEST -HD_SIDE_RESPONSE = cnghttp2.NGHTTP2_HD_SIDE_RESPONSE - HD_DEFLATE_HD_TABLE_BUFSIZE_MAX = 4096 HD_ENTRY_OVERHEAD = cnghttp2.NGHTTP2_HD_ENTRY_OVERHEAD @@ -45,12 +42,6 @@ class HDTableEntry: def space(self): return self.namelen + self.valuelen + HD_ENTRY_OVERHEAD -cdef _change_table_size(cnghttp2.nghttp2_hd_context *ctx, hd_table_bufsize_max): - cdef int rv - rv = cnghttp2.nghttp2_hd_change_table_size(ctx, hd_table_bufsize_max) - if rv != 0: - raise Exception(_strerror(rv)) - cdef _get_hd_table(cnghttp2.nghttp2_hd_context *ctx): cdef int length = ctx.hd_table.len cdef cnghttp2.nghttp2_hd_entry *entry @@ -65,35 +56,25 @@ cdef _get_hd_table(cnghttp2.nghttp2_hd_context *ctx): return res cdef _get_pybytes(uint8_t *b, uint16_t blen): - # While the |blen| is positive, the |b| could be NULL. This is - # because deflater may deallocate the byte strings its local table - # space. - if b == NULL and blen > 0: - val = None - else: - val = b[:blen] - return val + return b[:blen] cdef class HDDeflater: - '''Performs header compression. The header compression algorithm has - to know the header set to be compressed is request headers or - response headers. It is indicated by |side| parameter in the - constructor. The constructor also takes |hd_table_bufsize_max| - parameter, which limits the usage of header table in the given - amount of bytes. This is necessary because the header compressor - and decompressor has to share the same amount of header table and - the decompressor decides that number. The compressor may not want - to use all header table size because of limited memory - availability. In that case, the |hd_table_bufsize_max| can be used - to cap the upper limit of talbe size whatever the header table - size is chosen. The default value of |hd_table_bufsize_max| is - 4096 bytes. + '''Performs header compression. The constructor takes + |hd_table_bufsize_max| parameter, which limits the usage of header + table in the given amount of bytes. This is necessary because the + header compressor and decompressor has to share the same amount of + header table and the decompressor decides that number. The + compressor may not want to use all header table size because of + limited memory availability. In that case, the + |hd_table_bufsize_max| can be used to cap the upper limit of table + size whatever the header table size is chosen by the decompressor. + The default value of |hd_table_bufsize_max| is 4096 bytes. The following example shows how to compress request header sets: import binascii, nghttp2 - deflater = nghttp2.HDDeflater(nghttp2.HD_SIDE_REQUEST) + deflater = nghttp2.HDDeflater() res = deflater.deflate([(b'foo', b'bar'), (b'baz', b'buz')]) print(binascii.b2a_hex(res)) @@ -102,17 +83,13 @@ cdef class HDDeflater: cdef cnghttp2.nghttp2_hd_deflater _deflater - def __cinit__(self, side, + def __cinit__(self, hd_table_bufsize_max = HD_DEFLATE_HD_TABLE_BUFSIZE_MAX): - rv = cnghttp2.nghttp2_hd_deflate_init2(&self._deflater, side, + rv = cnghttp2.nghttp2_hd_deflate_init2(&self._deflater, hd_table_bufsize_max) if rv != 0: raise Exception(_strerror(rv)) - def __init__(self, side, - hd_table_bufsize_max = HD_DEFLATE_HD_TABLE_BUFSIZE_MAX): - super(HDDeflater, self).__init__() - def __dealloc__(self): cnghttp2.nghttp2_hd_deflate_free(&self._deflater) @@ -165,7 +142,11 @@ cdef class HDDeflater: An exception will be raised on error. ''' - _change_table_size(&self._deflater.ctx, hd_table_bufsize_max) + cdef int rv + rv = cnghttp2.nghttp2_hd_deflate_change_table_size(&self._deflater, + hd_table_bufsize_max) + if rv != 0: + raise Exception(_strerror(rv)) def get_hd_table(self,): '''Returns copy of current dynamic header table.''' @@ -177,7 +158,7 @@ cdef class HDInflater: The following example shows how to compress request header sets: data = b'0082c5ad82bd0f000362617a0362757a' - inflater = nghttp2.HDInflater(nghttp2.HD_SIDE_REQUEST) + inflater = nghttp2.HDInflater() hdrs = inflater.inflate(data) print(hdrs) @@ -185,14 +166,11 @@ cdef class HDInflater: cdef cnghttp2.nghttp2_hd_inflater _inflater - def __cinit__(self, side): - rv = cnghttp2.nghttp2_hd_inflate_init(&self._inflater, side) + def __cinit__(self): + rv = cnghttp2.nghttp2_hd_inflate_init(&self._inflater) if rv != 0: raise Exception(_strerror(rv)) - def __init__(self, side): - super(HDInflater, self).__init__() - def __dealloc__(self): cnghttp2.nghttp2_hd_inflate_free(&self._inflater) @@ -231,7 +209,11 @@ cdef class HDInflater: An exception will be raised on error. ''' - _change_table_size(&self._inflater.ctx, hd_table_bufsize_max) + cdef int rv + rv = cnghttp2.nghttp2_hd_inflate_change_table_size(&self._inflater, + hd_table_bufsize_max) + if rv != 0: + raise Exception(_strerror(rv)) def get_hd_table(self): '''Returns copy of current dynamic header table.''' @@ -255,5 +237,5 @@ def print_hd_table(hdtable): print('[{}] (s={}) (r={}) {}: {}'\ .format(idx, entry.space(), 'y' if entry.ref else 'n', - '**DEALLOCATED**' if entry.name is None else entry.name.decode('utf-8'), - '**DEALLOCATED**' if entry.value is None else entry.value.decode('utf-8'))) + entry.name.decode('utf-8'), + entry.value.decode('utf-8'))) diff --git a/src/comp_helper.c b/src/comp_helper.c index 9caac646..c258d78f 100644 --- a/src/comp_helper.c +++ b/src/comp_helper.c @@ -27,11 +27,7 @@ static void dump_val(json_t *jent, const char *key, uint8_t *val, size_t len) { - if(val == NULL && len > 0) { - json_object_set_new(jent, key, json_string("**DEALLOCATED**")); - } else { - json_object_set_new(jent, key, json_pack("s#", val, len)); - } + json_object_set_new(jent, key, json_pack("s#", val, len)); } json_t* dump_header_table(nghttp2_hd_context *context) @@ -58,12 +54,6 @@ json_t* dump_header_table(nghttp2_hd_context *context) json_object_set_new(obj, "size", json_integer(context->hd_table_bufsize)); json_object_set_new(obj, "max_size", json_integer(context->hd_table_bufsize_max)); - if(context->role == NGHTTP2_HD_ROLE_DEFLATE) { - json_object_set_new(obj, "deflate_size", - json_integer(context->deflate_hd_table_bufsize)); - json_object_set_new(obj, "max_deflate_size", - json_integer(context->deflate_hd_table_bufsize_max)); - } return obj; } @@ -93,13 +83,11 @@ json_t* dump_headers(const nghttp2_nv *nva, size_t nvlen) return headers; } -void output_json_header(int side) +void output_json_header(void) { printf("{\n" - " \"context\": \"%s\",\n" " \"cases\":\n" - " [\n", - (side == NGHTTP2_HD_SIDE_REQUEST ? "request" : "response")); + " [\n"); } void output_json_footer(void) diff --git a/src/comp_helper.h b/src/comp_helper.h index fbf899f9..974afecb 100644 --- a/src/comp_helper.h +++ b/src/comp_helper.h @@ -40,7 +40,7 @@ json_t* dump_header(const uint8_t *name, size_t namelen, json_t* dump_headers(const nghttp2_nv *nva, size_t nvlen); -void output_json_header(int side); +void output_json_header(void); void output_json_footer(void); diff --git a/src/deflatehd.c b/src/deflatehd.c index c492f679..cefa7118 100644 --- a/src/deflatehd.c +++ b/src/deflatehd.c @@ -44,7 +44,6 @@ typedef struct { size_t table_size; size_t deflate_table_size; - nghttp2_hd_side side; int http1text; int dump_header_table; int no_refset; @@ -174,11 +173,11 @@ static int deflate_hd_json(json_t *obj, nghttp2_hd_deflater *deflater, int seq) return 0; } -static void init_deflater(nghttp2_hd_deflater *deflater, nghttp2_hd_side side) +static void init_deflater(nghttp2_hd_deflater *deflater) { - nghttp2_hd_deflate_init2(deflater, side, config.deflate_table_size); + nghttp2_hd_deflate_init2(deflater, config.deflate_table_size); nghttp2_hd_deflate_set_no_refset(deflater, config.no_refset); - nghttp2_hd_change_table_size(&deflater->ctx, config.table_size); + nghttp2_hd_deflate_change_table_size(deflater, config.table_size); } static void deinit_deflater(nghttp2_hd_deflater *deflater) @@ -193,19 +192,12 @@ static int perform(void) json_error_t error; size_t len; nghttp2_hd_deflater deflater; - nghttp2_hd_side side; json = json_loadf(stdin, 0, &error); if(json == NULL) { fprintf(stderr, "JSON loading failed\n"); exit(EXIT_FAILURE); } - if(strcmp("request", json_string_value(json_object_get(json, "context"))) - == 0) { - side = NGHTTP2_HD_SIDE_REQUEST; - } else { - side = NGHTTP2_HD_SIDE_RESPONSE; - } cases = json_object_get(json, "cases"); if(cases == NULL) { fprintf(stderr, "Missing 'cases' key in root object\n"); @@ -215,8 +207,8 @@ static int perform(void) fprintf(stderr, "'cases' must be JSON array\n"); exit(EXIT_FAILURE); } - init_deflater(&deflater, side); - output_json_header(side); + init_deflater(&deflater); + output_json_header(); len = json_array_size(cases); for(i = 0; i < len; ++i) { json_t *obj = json_array_get(cases, i); @@ -244,8 +236,8 @@ static int perform_from_http1text(void) nghttp2_nv nva[256]; int seq = 0; nghttp2_hd_deflater deflater; - init_deflater(&deflater, config.side); - output_json_header(config.side); + init_deflater(&deflater); + output_json_header(); for(;;) { size_t nvlen = 0; int end = 0; @@ -355,10 +347,6 @@ static void print_help(void) "The output of this program can be used as input for inflatehd.\n" "\n" "OPTIONS:\n" - " -r, --response Use response compression context instead of\n" - " request if -t is used. For JSON input, it is\n" - " determined by inspecting \"context\" key in\n" - " root JSON object.\n" " -t, --http1text Use HTTP/1 style header field text as input.\n" " Each header set is delimited by single empty\n" " line.\n" @@ -377,7 +365,6 @@ static void print_help(void) } static struct option long_options[] = { - {"response", no_argument, NULL, 'r'}, {"http1text", no_argument, NULL, 't'}, {"table-size", required_argument, NULL, 's'}, {"deflate-table-size", required_argument, NULL, 'S'}, @@ -390,7 +377,6 @@ int main(int argc, char **argv) { char *end; - config.side = NGHTTP2_HD_SIDE_REQUEST; config.table_size = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE; config.deflate_table_size = NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE; config.http1text = 0; @@ -398,15 +384,11 @@ int main(int argc, char **argv) config.no_refset = 0; while(1) { int option_index = 0; - int c = getopt_long(argc, argv, "S:cdhrs:t", long_options, &option_index); + int c = getopt_long(argc, argv, "S:cdhs:t", long_options, &option_index); if(c == -1) { break; } switch(c) { - case 'r': - /* --response */ - config.side = NGHTTP2_HD_SIDE_RESPONSE; - break; case 'h': print_help(); exit(EXIT_SUCCESS); diff --git a/src/inflatehd.c b/src/inflatehd.c index a2a0b787..5fcf319d 100644 --- a/src/inflatehd.c +++ b/src/inflatehd.c @@ -42,7 +42,6 @@ #include "comp_helper.h" typedef struct { - size_t table_size; int dump_header_table; } inflate_config; @@ -110,8 +109,8 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) seq); return -1; } - rv = nghttp2_hd_change_table_size(&inflater->ctx, - json_integer_value(table_size)); + rv = nghttp2_hd_inflate_change_table_size(inflater, + json_integer_value(table_size)); if(rv != 0) { fprintf(stderr, "nghttp2_hd_change_table_size() failed with error %s at %d\n", @@ -163,19 +162,12 @@ static int perform(void) json_t *json, *cases; json_error_t error; size_t len; - nghttp2_hd_side side; json = json_loadf(stdin, 0, &error); if(json == NULL) { fprintf(stderr, "JSON loading failed\n"); exit(EXIT_FAILURE); } - if(strcmp("request", json_string_value(json_object_get(json, "context"))) - == 0) { - side = NGHTTP2_HD_SIDE_REQUEST; - } else { - side = NGHTTP2_HD_SIDE_RESPONSE; - } cases = json_object_get(json, "cases"); if(cases == NULL) { fprintf(stderr, "Missing 'cases' key in root object\n"); @@ -185,10 +177,8 @@ static int perform(void) fprintf(stderr, "'cases' must be JSON array\n"); exit(EXIT_FAILURE); } - nghttp2_hd_inflate_init(&inflater, side); - nghttp2_hd_change_table_size(&inflater.ctx, config.table_size); - - output_json_header(side); + nghttp2_hd_inflate_init(&inflater); + output_json_header(); len = json_array_size(cases); for(i = 0; i < len; ++i) { json_t *obj = json_array_get(cases, i); @@ -241,29 +231,21 @@ static void print_help(void) "The output of this program can be used as input for deflatehd.\n" "\n" "OPTIONS:\n" - " -s, --table-size=\n" - " Set dynamic table size. In the HPACK\n" - " specification, this value is denoted by\n" - " SETTINGS_HEADER_TABLE_SIZE.\n" - " Default: 4096\n" " -d, --dump-header-table\n" " Output dynamic header table.\n"); } static struct option long_options[] = { - {"table-size", required_argument, NULL, 's'}, {"dump-header-table", no_argument, NULL, 'd'}, {NULL, 0, NULL, 0 } }; int main(int argc, char **argv) { - char *end; - config.table_size = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE; config.dump_header_table = 0; while(1) { int option_index = 0; - int c = getopt_long(argc, argv, "dhs:", long_options, &option_index); + int c = getopt_long(argc, argv, "dh", long_options, &option_index); if(c == -1) { break; } @@ -271,15 +253,6 @@ int main(int argc, char **argv) case 'h': print_help(); exit(EXIT_SUCCESS); - case 's': - /* --table-size */ - errno = 0; - config.table_size = strtoul(optarg, &end, 10); - if(errno == ERANGE || *end != '\0') { - fprintf(stderr, "-s: Bad option value\n"); - exit(EXIT_FAILURE); - } - break; case 'd': /* --dump-header-table */ config.dump_header_table = 1; diff --git a/tests/main.c b/tests/main.c index 699fb3b5..415acc03 100644 --- a/tests/main.c +++ b/tests/main.c @@ -225,8 +225,6 @@ int main(int argc, char* argv[]) test_nghttp2_hd_deflate_same_indexed_repr) || !CU_add_test(pSuite, "hd_deflate_common_header_eviction", test_nghttp2_hd_deflate_common_header_eviction) || - !CU_add_test(pSuite, "hd_deflate_deflate_buffer", - test_nghttp2_hd_deflate_deflate_buffer) || !CU_add_test(pSuite, "hd_deflate_clear_refset", test_nghttp2_hd_deflate_clear_refset) || !CU_add_test(pSuite, "hd_inflate_indname_noinc", diff --git a/tests/nghttp2_frame_test.c b/tests/nghttp2_frame_test.c index d6495d19..9fe5cbbb 100644 --- a/tests/nghttp2_frame_test.c +++ b/tests/nghttp2_frame_test.c @@ -82,8 +82,8 @@ void test_nghttp2_frame_pack_headers() ssize_t nv_offset; nva_out_init(&out); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); + nghttp2_hd_inflate_init(&inflater); nva = headers(); nvlen = HEADERS_LENGTH; @@ -171,7 +171,7 @@ void test_nghttp2_frame_pack_headers_frame_too_large(void) } nvlen = nghttp2_nv_array_copy(&nva, big_hds, big_hdslen); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); nghttp2_frame_headers_init(&frame, NGHTTP2_FLAG_END_STREAM|NGHTTP2_FLAG_END_HEADERS, 1000000007, @@ -269,8 +269,8 @@ void test_nghttp2_frame_pack_push_promise() nva_out out; nva_out_init(&out); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_RESPONSE); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_RESPONSE); + nghttp2_hd_deflate_init(&deflater); + nghttp2_hd_inflate_init(&inflater); nva = headers(); nvlen = HEADERS_LENGTH; diff --git a/tests/nghttp2_hd_test.c b/tests/nghttp2_hd_test.c index 7d75eddd..d7756c37 100644 --- a/tests/nghttp2_hd_test.c +++ b/tests/nghttp2_hd_test.c @@ -59,8 +59,8 @@ void test_nghttp2_hd_deflate(void) nva_out out; nva_out_init(&out); - CU_ASSERT(0 == nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST)); - CU_ASSERT(0 == nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST)); + CU_ASSERT(0 == nghttp2_hd_deflate_init(&deflater)); + CU_ASSERT(0 == nghttp2_hd_inflate_init(&inflater)); blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, nv_offset, nva1, sizeof(nva1)/sizeof(nghttp2_nv)); CU_ASSERT(blocklen > 0); @@ -142,8 +142,8 @@ void test_nghttp2_hd_deflate_same_indexed_repr(void) nva_out out; nva_out_init(&out); - CU_ASSERT(0 == nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST)); - CU_ASSERT(0 == nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST)); + CU_ASSERT(0 == nghttp2_hd_deflate_init(&deflater)); + CU_ASSERT(0 == nghttp2_hd_inflate_init(&inflater)); /* Encode 2 same headers. cookie:alpha is not in the reference set, so first emit literal repr and then 2 emits of indexed repr. */ @@ -198,8 +198,8 @@ void test_nghttp2_hd_deflate_common_header_eviction(void) nva[i].valuelen = sizeof(value); } - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); + nghttp2_hd_inflate_init(&inflater); /* First emit "h1: ..." to put it in the reference set (index = 0). */ @@ -236,174 +236,6 @@ void test_nghttp2_hd_deflate_common_header_eviction(void) nghttp2_hd_deflate_free(&deflater); } -void test_nghttp2_hd_deflate_deflate_buffer(void) -{ - nghttp2_hd_deflater deflater; - nghttp2_hd_inflater inflater; - size_t i; - ssize_t blocklen; - uint8_t *buf = NULL; - size_t buflen = 0; - nghttp2_nv nva1[] = { MAKE_NV("k1", "v1"), /* 36 */ - MAKE_NV("k10", "v10"), /* 38 */ - MAKE_NV("k100", "v100"), /* 40 */ - MAKE_NV("k1000", "v1000") /* 42 */ - }; /* Total: 156 */ - nghttp2_nv nva2[] = { MAKE_NV("k10", "v10"), /* 38 */ - MAKE_NV("k1", "v1") /* 36 */ - }; - nghttp2_nv nv3; - uint8_t val[256]; - nghttp2_nv nva4[] = { MAKE_NV(":method", "GET"), - MAKE_NV(":scheme", "http") - }; - nghttp2_hd_entry *ent; - nva_out out; - - nva_out_init(&out); - memset(val, 'a', sizeof(val)); - nv3.name = nv3.value = val; - nv3.namelen = nv3.valuelen = sizeof(val); - - /* Check the case where entry from static table is inserted to - dynamic header table. And it is out of deflate header table - size. */ - nghttp2_hd_deflate_init2(&deflater, NGHTTP2_HD_SIDE_REQUEST, 32); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); - blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, - nva4, ARRLEN(nva4)); - CU_ASSERT(blocklen > 0); - /* Now header table should look like this: - * - * 0: :scheme, http (-) - * 1: :method, GET (-) - * - * name/value of all entries must be NULL. - */ - CU_ASSERT(2 == deflater.ctx.hd_table.len); - CU_ASSERT(0 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(0 == deflater.ctx.deflate_hd_table_bufsize); - for(i = 0; i < 2; ++i) { - ent = nghttp2_hd_table_get(&deflater.ctx, i); - CU_ASSERT(ent->nv.name == NULL); - CU_ASSERT(ent->nv.value == NULL); - CU_ASSERT(0 == (ent->flags & NGHTTP2_HD_FLAG_REFSET)); - } - - CU_ASSERT(blocklen == inflate_hd(&inflater, &out, buf, blocklen)); - - CU_ASSERT(2 == out.nvlen); - assert_nv_equal(nva4, out.nva, 2); - - nva_out_reset(&out); - - nghttp2_hd_deflate_free(&deflater); - nghttp2_hd_inflate_free(&inflater); - - /* 156 buffer size can hold all headers in deflate region */ - nghttp2_hd_deflate_init2(&deflater, NGHTTP2_HD_SIDE_REQUEST, 156); - blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, - nva1, ARRLEN(nva1)); - CU_ASSERT(blocklen > 0); - /* Now header table should look like this: - * - * 0: k1000, v100 - * 1: k100, v100 - * 2: k10, v10 - * 3: k1, v1 - */ - CU_ASSERT(4 == deflater.ctx.hd_table.len); - CU_ASSERT(4 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(156 == deflater.ctx.deflate_hd_table_bufsize); - for(i = 0; i < 4; ++i) { - CU_ASSERT(nghttp2_hd_table_get(&deflater.ctx, i)->nv.name != NULL); - CU_ASSERT(nghttp2_hd_table_get(&deflater.ctx, i)->nv.value != NULL); - } - - CU_ASSERT(0 == nghttp2_hd_change_table_size(&deflater.ctx, 156)); - CU_ASSERT(4 == deflater.ctx.hd_table.len); - CU_ASSERT(4 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(156 == deflater.ctx.deflate_hd_table_bufsize); - - blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, &nv3, 1); - CU_ASSERT(blocklen > 0); - /* Now header table should be unchanged, because we don't index - large header */ - CU_ASSERT(4 == deflater.ctx.hd_table.len); - CU_ASSERT(4 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(156 == deflater.ctx.deflate_hd_table_bufsize); - - nghttp2_hd_deflate_free(&deflater); - - /* Check more complex use case */ - nghttp2_hd_deflate_init2(&deflater, NGHTTP2_HD_SIDE_REQUEST, 155); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); - blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, - nva1, ARRLEN(nva1)); - CU_ASSERT(blocklen > 0); - /* Now header table should look like this: - * - * 0: k1000, v100 (R) - * 1: k100, v100 (R) - * 2: k10, v10 (R) - * 3: k1, v1 (-) <- name, value must be NULL and not in reference set - * - * But due to the deflate table size limit, name/value of index=3 must - * be NULL. - */ - CU_ASSERT(4 == deflater.ctx.hd_table.len); - CU_ASSERT(3 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(120 == deflater.ctx.deflate_hd_table_bufsize); - for(i = 0; i < 3; ++i) { - CU_ASSERT(nghttp2_hd_table_get(&deflater.ctx, i)->nv.name != NULL); - CU_ASSERT(nghttp2_hd_table_get(&deflater.ctx, i)->nv.value != NULL); - } - ent = nghttp2_hd_table_get(&deflater.ctx, 3); - CU_ASSERT(ent->nv.name == NULL); - CU_ASSERT(ent->nv.value == NULL); - CU_ASSERT(0 == (ent->flags & NGHTTP2_HD_FLAG_REFSET)); - - CU_ASSERT(blocklen == inflate_hd(&inflater, &out, buf, blocklen)); - - CU_ASSERT(4 == out.nvlen); - assert_nv_equal(nva1, out.nva, 4); - - nva_out_reset(&out); - - blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, - nva2, ARRLEN(nva2)); - CU_ASSERT(blocklen > 0); - /* Now header table should look like this: - * - * 0: k1, v1 (R) - * 1: k1000, v100 (R) - * 2: k100, v100 (R) - * 3: k10, v10 (-) <- name, value must be NULL - * 4: k1, v1 (-) <- name, value must be NULL - */ - CU_ASSERT(5 == deflater.ctx.hd_table.len); - CU_ASSERT(3 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(118 == deflater.ctx.deflate_hd_table_bufsize); - ent = nghttp2_hd_table_get(&deflater.ctx, 3); - CU_ASSERT(0 == (ent->flags & NGHTTP2_HD_FLAG_REFSET)); - ent = nghttp2_hd_table_get(&deflater.ctx, 3); - CU_ASSERT(0 == (ent->flags & NGHTTP2_HD_FLAG_REFSET)); - - CU_ASSERT(blocklen == inflate_hd(&inflater, &out, buf, blocklen)); - - CU_ASSERT(2 == out.nvlen); - /* Sort before comparison */ - nghttp2_nv_array_sort(nva2, 2); - assert_nv_equal(nva2, out.nva, 2); - - nva_out_reset(&out); - - free(buf); - nghttp2_hd_inflate_free(&inflater); - nghttp2_hd_deflate_free(&deflater); - -} - void test_nghttp2_hd_deflate_clear_refset(void) { nghttp2_hd_deflater deflater; @@ -419,10 +251,10 @@ void test_nghttp2_hd_deflate_clear_refset(void) nva_out out; nva_out_init(&out); - nghttp2_hd_deflate_init2(&deflater, NGHTTP2_HD_SIDE_REQUEST, + nghttp2_hd_deflate_init2(&deflater, NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE); nghttp2_hd_deflate_set_no_refset(&deflater, 1); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); for(i = 0; i < 2; ++i) { blocklen = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, @@ -457,14 +289,13 @@ void test_nghttp2_hd_inflate_indname_noinc(void) nva_out out; nva_out_init(&out); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); for(i = 0; i < ARRLEN(nv); ++i) { offset = 0; CU_ASSERT(0 == nghttp2_hd_emit_indname_block(&buf, &buflen, &offset, 56, nv[i].value, nv[i].valuelen, - 0, - NGHTTP2_HD_SIDE_REQUEST)); + 0)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); CU_ASSERT(1 == out.nvlen); @@ -488,11 +319,10 @@ void test_nghttp2_hd_inflate_indname_inc(void) nva_out out; nva_out_init(&out); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); CU_ASSERT(0 == nghttp2_hd_emit_indname_block(&buf, &buflen, &offset, 56, - nv.value, nv.valuelen, 1, - NGHTTP2_HD_SIDE_REQUEST)); + nv.value, nv.valuelen, 1)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); CU_ASSERT(1 == out.nvlen); @@ -517,21 +347,17 @@ void test_nghttp2_hd_inflate_indname_inc_eviction(void) nva_out out; nva_out_init(&out); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); memset(value, '0', sizeof(value)); CU_ASSERT(0 == nghttp2_hd_emit_indname_block(&buf, &buflen, &offset, 13, - value, sizeof(value), 1, - NGHTTP2_HD_SIDE_REQUEST)); + value, sizeof(value), 1)); CU_ASSERT(0 == nghttp2_hd_emit_indname_block(&buf, &buflen, &offset, 14, - value, sizeof(value), 1, - NGHTTP2_HD_SIDE_REQUEST)); + value, sizeof(value), 1)); CU_ASSERT(0 == nghttp2_hd_emit_indname_block(&buf, &buflen, &offset, 15, - value, sizeof(value), 1, - NGHTTP2_HD_SIDE_REQUEST)); + value, sizeof(value), 1)); CU_ASSERT(0 == nghttp2_hd_emit_indname_block(&buf, &buflen, &offset, 16, - value, sizeof(value), 1, - NGHTTP2_HD_SIDE_REQUEST)); + value, sizeof(value), 1)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); @@ -569,12 +395,11 @@ void test_nghttp2_hd_inflate_newname_noinc(void) nva_out out; nva_out_init(&out); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); for(i = 0; i < ARRLEN(nv); ++i) { offset = 0; CU_ASSERT(0 == nghttp2_hd_emit_newname_block(&buf, &buflen, &offset, - &nv[i], 0, - NGHTTP2_HD_SIDE_REQUEST)); + &nv[i], 0)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); CU_ASSERT(1 == out.nvlen); @@ -598,11 +423,10 @@ void test_nghttp2_hd_inflate_newname_inc(void) nva_out out; nva_out_init(&out); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); CU_ASSERT(0 == nghttp2_hd_emit_newname_block(&buf, &buflen, &offset, - &nv, 1, - NGHTTP2_HD_SIDE_REQUEST)); + &nv, 1)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); CU_ASSERT(1 == out.nvlen); @@ -635,11 +459,10 @@ void test_nghttp2_hd_inflate_clearall_inc(void) nv.value = value; nv.valuelen = sizeof(value); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); CU_ASSERT(0 == nghttp2_hd_emit_newname_block(&buf, &buflen, &offset, - &nv, 1, - NGHTTP2_HD_SIDE_REQUEST)); + &nv, 1)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); CU_ASSERT(1 == out.nvlen); @@ -663,8 +486,7 @@ void test_nghttp2_hd_inflate_clearall_inc(void) offset = 0; CU_ASSERT(0 == nghttp2_hd_emit_newname_block(&buf, &buflen, &offset, - &nv, 1, - NGHTTP2_HD_SIDE_REQUEST)); + &nv, 1)); CU_ASSERT((ssize_t)offset == inflate_hd(&inflater, &out, buf, offset)); CU_ASSERT(1 == out.nvlen); @@ -690,7 +512,7 @@ void test_nghttp2_hd_inflate_zero_length_huffman(void) buf[2] = 'x'; buf[3] = 0x80; - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); CU_ASSERT(4 == inflate_hd(&inflater, &out, buf, 4)); CU_ASSERT(1 == out.nvlen); @@ -706,35 +528,158 @@ void test_nghttp2_hd_inflate_zero_length_huffman(void) void test_nghttp2_hd_change_table_size(void) { nghttp2_hd_deflater deflater; + nghttp2_hd_inflater inflater; nghttp2_nv nva[] = { MAKE_NV(":method", "GET"), MAKE_NV(":path", "/") }; uint8_t *buf = NULL; size_t buflen = 0; ssize_t rv; + nva_out out; + size_t offset; + + nva_out_init(&out); + + nghttp2_hd_deflate_init(&deflater); + nghttp2_hd_inflate_init(&inflater); + + /* inflater changes notifies 8000 max header table size */ + CU_ASSERT(0 == nghttp2_hd_inflate_change_table_size(&inflater, 8000)); + CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 8000)); + + CU_ASSERT(127 == deflater.ctx.hd_table.mask); + CU_ASSERT(8000 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(255 == inflater.ctx.hd_table.mask); + CU_ASSERT(8000 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(8000 == inflater.settings_hd_table_bufsize_max); + + /* This will emit encoding context update with header table size 4096 */ + rv = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, nva, 2); + CU_ASSERT(rv > 0); + CU_ASSERT(2 == deflater.ctx.hd_table.len); + CU_ASSERT(4096 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(rv == inflate_hd(&inflater, &out, buf, rv)); + CU_ASSERT(2 == inflater.ctx.hd_table.len); + CU_ASSERT(4096 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(8000 == inflater.settings_hd_table_bufsize_max); + + nva_out_reset(&out); + + /* inflater changes header table size to 1024 */ + CU_ASSERT(0 == nghttp2_hd_inflate_change_table_size(&inflater, 1024)); + CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 1024)); + + CU_ASSERT(127 == deflater.ctx.hd_table.mask); + CU_ASSERT(1024 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(255 == inflater.ctx.hd_table.mask); + CU_ASSERT(1024 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(1024 == inflater.settings_hd_table_bufsize_max); + + rv = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, nva, 2); + CU_ASSERT(rv >= 0); + CU_ASSERT(2 == deflater.ctx.hd_table.len); + CU_ASSERT(1024 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(rv == inflate_hd(&inflater, &out, buf, rv)); + CU_ASSERT(2 == inflater.ctx.hd_table.len); + CU_ASSERT(1024 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(1024 == inflater.settings_hd_table_bufsize_max); + + nva_out_reset(&out); + + /* inflater changes header table size to 0 */ + CU_ASSERT(0 == nghttp2_hd_inflate_change_table_size(&inflater, 0)); + CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 0)); + + CU_ASSERT(127 == deflater.ctx.hd_table.mask); + CU_ASSERT(0 == deflater.ctx.hd_table.len); + CU_ASSERT(0 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(255 == inflater.ctx.hd_table.mask); + CU_ASSERT(0 == inflater.ctx.hd_table.len); + CU_ASSERT(0 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(0 == inflater.settings_hd_table_bufsize_max); + + rv = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, nva, 2); + CU_ASSERT(rv >= 0); + CU_ASSERT(0 == deflater.ctx.hd_table.len); + CU_ASSERT(0 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(rv == inflate_hd(&inflater, &out, buf, rv)); + CU_ASSERT(0 == inflater.ctx.hd_table.len); + CU_ASSERT(0 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(0 == inflater.settings_hd_table_bufsize_max); + + nva_out_reset(&out); + + free(buf); + nghttp2_hd_inflate_free(&inflater); + nghttp2_hd_deflate_free(&deflater); + + /* Check table buffer is expanded */ + buf = NULL; + buflen = 0; + nghttp2_hd_deflate_init2(&deflater, 8192); + nghttp2_hd_inflate_init(&inflater); + + /* First inflater changes header table size to 8000 */ + CU_ASSERT(0 == nghttp2_hd_inflate_change_table_size(&inflater, 8000)); + CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 8000)); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); - CU_ASSERT(0 == nghttp2_hd_change_table_size(&deflater.ctx, 8000)); CU_ASSERT(255 == deflater.ctx.hd_table.mask); CU_ASSERT(8000 == deflater.ctx.hd_table_bufsize_max); + CU_ASSERT(255 == inflater.ctx.hd_table.mask); + CU_ASSERT(8000 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(8000 == inflater.settings_hd_table_bufsize_max); + rv = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, nva, 2); CU_ASSERT(rv > 0); CU_ASSERT(2 == deflater.ctx.hd_table.len); + CU_ASSERT(8000 == deflater.ctx.hd_table_bufsize_max); - CU_ASSERT(0 == nghttp2_hd_change_table_size(&deflater.ctx, 16384)); - CU_ASSERT(511 == deflater.ctx.hd_table.mask); + CU_ASSERT(rv == inflate_hd(&inflater, &out, buf, rv)); + CU_ASSERT(2 == inflater.ctx.hd_table.len); + CU_ASSERT(8000 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(8000 == inflater.settings_hd_table_bufsize_max); + + nva_out_reset(&out); + + CU_ASSERT(0 == nghttp2_hd_inflate_change_table_size(&inflater, 16383)); + CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 16383)); + + CU_ASSERT(255 == deflater.ctx.hd_table.mask); + CU_ASSERT(16383 == deflater.ctx.hd_table_bufsize_max); + + CU_ASSERT(511 == inflater.ctx.hd_table.mask); + CU_ASSERT(16383 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(16383 == inflater.settings_hd_table_bufsize_max); + + rv = nghttp2_hd_deflate_hd(&deflater, &buf, &buflen, 0, nva, 2); + CU_ASSERT(rv >= 0); CU_ASSERT(2 == deflater.ctx.hd_table.len); - CU_ASSERT(2 == deflater.ctx.deflate_hd_tablelen); - CU_ASSERT(5 == - deflater.ctx.hd_table.buffer[deflater.ctx.hd_table.first] - ->nv.namelen); + CU_ASSERT(8192 == deflater.ctx.hd_table_bufsize_max); - CU_ASSERT(0 == nghttp2_hd_change_table_size(&deflater.ctx, 0)); - CU_ASSERT(511 == deflater.ctx.hd_table.mask); - CU_ASSERT(0 == deflater.ctx.hd_table.len); - CU_ASSERT(0 == deflater.ctx.deflate_hd_tablelen); + CU_ASSERT(rv == inflate_hd(&inflater, &out, buf, rv)); + CU_ASSERT(2 == inflater.ctx.hd_table.len); + CU_ASSERT(8192 == inflater.ctx.hd_table_bufsize_max); + CU_ASSERT(16383 == inflater.settings_hd_table_bufsize_max); + + nva_out_reset(&out); + + /* Lastly, check the error condition */ + offset = 0; + rv = nghttp2_hd_emit_table_size(&buf, &buflen, &offset, 25600); + CU_ASSERT(rv == 0); + CU_ASSERT(NGHTTP2_ERR_HEADER_COMP == + inflate_hd(&inflater, &out, buf, offset)); + + nva_out_reset(&out); free(buf); + nghttp2_hd_inflate_free(&inflater); nghttp2_hd_deflate_free(&deflater); } @@ -899,8 +844,8 @@ void test_nghttp2_hd_deflate_inflate(void) MAKE_NV("x-cache-lookup", "HIT from alphabravo:3128"), }; - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); + nghttp2_hd_inflate_init(&inflater); check_deflate_inflate(&deflater, &inflater, nv1, ARRLEN(nv1)); check_deflate_inflate(&deflater, &inflater, nv2, ARRLEN(nv2)); diff --git a/tests/nghttp2_hd_test.h b/tests/nghttp2_hd_test.h index 613ab322..1e9b763f 100644 --- a/tests/nghttp2_hd_test.h +++ b/tests/nghttp2_hd_test.h @@ -28,7 +28,6 @@ void test_nghttp2_hd_deflate(void); void test_nghttp2_hd_deflate_same_indexed_repr(void); void test_nghttp2_hd_deflate_common_header_eviction(void); -void test_nghttp2_hd_deflate_deflate_buffer(void); void test_nghttp2_hd_deflate_clear_refset(void); void test_nghttp2_hd_inflate_indname_noinc(void); void test_nghttp2_hd_inflate_indname_inc(void); diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c index 568e1153..eccc314c 100644 --- a/tests/nghttp2_session_test.c +++ b/tests/nghttp2_session_test.c @@ -363,7 +363,7 @@ void test_nghttp2_session_recv(void) callbacks.on_frame_recv_callback = on_frame_recv_callback; user_data.df = &df; nghttp2_session_server_new(&session, &callbacks, &user_data); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); nvlen = nghttp2_nv_array_copy(&nva, nv, ARRLEN(nv)); nghttp2_frame_headers_init(&frame.headers, NGHTTP2_FLAG_END_HEADERS, @@ -446,7 +446,7 @@ void test_nghttp2_session_recv_invalid_stream_id(void) user_data.df = &df; user_data.invalid_frame_recv_cb_called = 0; nghttp2_session_server_new(&session, &callbacks, &user_data); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); nghttp2_frame_headers_init(&frame.headers, NGHTTP2_FLAG_END_HEADERS, 2, NGHTTP2_PRI_DEFAULT, NULL, 0); @@ -491,7 +491,7 @@ void test_nghttp2_session_recv_invalid_frame(void) user_data.df = &df; user_data.frame_send_cb_called = 0; nghttp2_session_server_new(&session, &callbacks, &user_data); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); nvlen = nghttp2_nv_array_copy(&nva, nv, ARRLEN(nv)); nghttp2_frame_headers_init(&frame.headers, NGHTTP2_FLAG_END_HEADERS, 1, NGHTTP2_PRI_DEFAULT, nva, nvlen); @@ -690,7 +690,7 @@ void test_nghttp2_session_recv_continuation(void) nghttp2_session_server_new(&session, &callbacks, &ud); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); /* Make 1 HEADERS and insert CONTINUATION header */ nvlen = nghttp2_nv_array_copy(&nva, nv1, ARRLEN(nv1)); @@ -746,7 +746,7 @@ void test_nghttp2_session_recv_continuation(void) /* Expecting CONTINUATION, but get the other frame */ nghttp2_session_server_new(&session, &callbacks, &ud); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); /* HEADERS without END_HEADERS flag */ nvlen = nghttp2_nv_array_copy(&nva, nv1, ARRLEN(nv1)); @@ -803,7 +803,7 @@ void test_nghttp2_session_recv_premature_headers(void) nghttp2_session_server_new(&session, &callbacks, &ud); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); nvlen = nghttp2_nv_array_copy(&nva, nv1, ARRLEN(nv1)); nghttp2_frame_headers_init(&frame.headers, NGHTTP2_FLAG_END_HEADERS, @@ -867,7 +867,7 @@ void test_nghttp2_session_continue(void) nghttp2_session_server_new(&session, &callbacks, &user_data); - nghttp2_hd_deflate_init(&deflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_deflate_init(&deflater); /* Make 2 HEADERS frames */ nvlen = nghttp2_nv_array_copy(&nva, nv1, ARRLEN(nv1)); @@ -2255,7 +2255,7 @@ void test_nghttp2_submit_request_without_data(void) callbacks.send_callback = accumulator_send_callback; CU_ASSERT(0 == nghttp2_session_client_new(&session, &callbacks, &ud)); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); CU_ASSERT(0 == nghttp2_submit_request(session, NGHTTP2_PRI_DEFAULT, nva, ARRLEN(nva), &data_prd, NULL)); item = nghttp2_session_get_next_ob_item(session); @@ -2327,7 +2327,7 @@ void test_nghttp2_submit_response_without_data(void) callbacks.send_callback = accumulator_send_callback; CU_ASSERT(0 == nghttp2_session_server_new(&session, &callbacks, &ud)); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_RESPONSE); + nghttp2_hd_inflate_init(&inflater); nghttp2_session_open_stream(session, 1, NGHTTP2_FLAG_END_STREAM, NGHTTP2_PRI_DEFAULT, NGHTTP2_STREAM_OPENING, NULL); @@ -2499,7 +2499,7 @@ void test_nghttp2_submit_headers(void) CU_ASSERT(0 == nghttp2_session_client_new(&session, &callbacks, &ud)); - nghttp2_hd_inflate_init(&inflater, NGHTTP2_HD_SIDE_REQUEST); + nghttp2_hd_inflate_init(&inflater); CU_ASSERT(0 == nghttp2_submit_headers(session, NGHTTP2_FLAG_END_STREAM, 1, NGHTTP2_PRI_DEFAULT,