Decode std/flate fixed Huffman tables.

This commit is contained in:
Nigel Tao committed 2017-07-28 13:28:31 +10:00
1 parent cbcf1b6025
commit bfbcae4365
9 files changed
+240 -114

No files matched your search

+2 -1
View File
@@ -650,7 +650,8 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
isThisMethod(q.tm, n, "decode_header", 1) || isThisMethod(q.tm, n, "decode_lsd", 1) ||
isThisMethod(q.tm, n, "decode_extension", 1) || isThisMethod(q.tm, n, "decode_id", 2) ||
isThisMethod(q.tm, n, "decode_uncompressed", 2) || isThisMethod(q.tm, n, "decode_huffman", 2) ||
isThisMethod(q.tm, n, "init_dynamic_huffman", 1) || isThisMethod(q.tm, n, "init_huff", 4) {
isThisMethod(q.tm, n, "init_fixed_huffman", 0) || isThisMethod(q.tm, n, "init_dynamic_huffman", 1) ||
isThisMethod(q.tm, n, "init_huff", 4) {
for _, o := range n.Args() {
// TODO: check that the arg range at the caller and the
+2 -1
View File
@@ -350,7 +350,8 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
isThisMethod(q.tm, n, "decode_header", 1) || isThisMethod(q.tm, n, "decode_lsd", 1) ||
isThisMethod(q.tm, n, "decode_extension", 1) || isThisMethod(q.tm, n, "decode_id", 2) ||
isThisMethod(q.tm, n, "decode_uncompressed", 2) || isThisMethod(q.tm, n, "decode_huffman", 2) ||
isThisMethod(q.tm, n, "init_dynamic_huffman", 1) || isThisMethod(q.tm, n, "init_huff", 4) {
isThisMethod(q.tm, n, "init_fixed_huffman", 0) || isThisMethod(q.tm, n, "init_dynamic_huffman", 1) ||
isThisMethod(q.tm, n, "init_huff", 4) {
if err := q.tcheckExpr(n.LHS().Expr(), depth); err != nil {
return err