mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Add array-of-u32 Huffman decoder.
This commit is contained in:
1 parent
d4ab9caa33
commit
eee67e083d
5 files changed
+245
-7
No files matched your search
@@ -72,6 +72,26 @@ var reasons = [...]struct {
|
||||
return nil
|
||||
}},
|
||||
|
||||
{`"a <= b: a <= c; c <= b"`, func(q *checker, n *a.Assert) error {
|
||||
op, xa, xb := parseBinaryOp(n.Condition())
|
||||
if op.Key() != t.KeyXBinaryLessEq {
|
||||
return errFailed
|
||||
}
|
||||
// a <= c
|
||||
xc := argValue(q.tm, n.Args(), "c")
|
||||
if xc == nil {
|
||||
return errFailed
|
||||
}
|
||||
if err := proveReasonRequirement(q, t.IDXBinaryLessEq, xa, xc); err != nil {
|
||||
return err
|
||||
}
|
||||
// c <= b
|
||||
if err := proveReasonRequirement(q, t.IDXBinaryLessEq, xc, xb); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}},
|
||||
|
||||
{`"a < (b + c): a < (b0 + c0); b0 <= b; c0 <= c"`, func(q *checker, n *a.Assert) error {
|
||||
op, xa, t0 := parseBinaryOp(n.Condition())
|
||||
if op.Key() != t.KeyXBinaryLessThan {
|
||||
|
||||
@@ -22,6 +22,7 @@ var reasons = [...]string{
|
||||
"a < (b + c): a < c; 0 <= b",
|
||||
"(a + b) <= c: a <= (c - b)",
|
||||
"a < b: a < c; c <= b",
|
||||
"a <= b: a <= c; c <= b",
|
||||
"a < (b + c): a < (b0 + c0); b0 <= b; c0 <= c",
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user