From a7c917a97048314e956d7264e97598465f88c1c7 Mon Sep 17 00:00:00 2001 From: Leandro Motta Barros Date: Tue, 4 Apr 2023 17:36:09 -0300 Subject: [PATCH] Update librsync-go to v0.8.5, circbuf to v0.1.3 Notable improvements these new versions bring: * Optimized code path for generating deltas with blocks that are power-of-two-sized. * Avoid allocating unbounded amounts of memory when the target differs completely from the source. * Several bugfixes in edge cases that shall not affect balenaEngine. Signed-off-by: Leandro Motta Barros Change-type: patch --- vendor.conf | 4 +- vendor/github.com/balena-os/circbuf/LICENSE | 0 vendor/github.com/balena-os/circbuf/README.md | 6 + vendor/github.com/balena-os/circbuf/anybuf.go | 38 ++ .../github.com/balena-os/circbuf/basebuf.go | 71 +++ .../github.com/balena-os/circbuf/circbuf.go | 145 ++--- vendor/github.com/balena-os/circbuf/go.mod | 3 + vendor/github.com/balena-os/circbuf/po2buf.go | 36 ++ .../balena-os/librsync-go/README.md | 25 +- .../github.com/balena-os/librsync-go/delta.go | 29 +- .../github.com/balena-os/librsync-go/go.mod | 21 +- .../github.com/balena-os/librsync-go/match.go | 26 +- vendor/github.com/balena-os/librsync-go/op.go | 512 +++++++++--------- .../balena-os/librsync-go/rollsum.go | 2 +- .../balena-os/librsync-go/signature.go | 76 ++- 15 files changed, 619 insertions(+), 375 deletions(-) mode change 100755 => 100644 vendor/github.com/balena-os/circbuf/LICENSE create mode 100644 vendor/github.com/balena-os/circbuf/anybuf.go create mode 100644 vendor/github.com/balena-os/circbuf/basebuf.go create mode 100644 vendor/github.com/balena-os/circbuf/go.mod create mode 100644 vendor/github.com/balena-os/circbuf/po2buf.go diff --git a/vendor.conf b/vendor.conf index c150a362f2..5816d49145 100644 --- a/vendor.conf +++ b/vendor.conf @@ -195,8 +195,8 @@ github.com/willf/bitset 559910e8471e48d76d9e5a1ba158 github.com/urfave/cli c71fbcefd21552b70cd625b2c54466006e258ad7 # v1.22.1 # balena deltas -github.com/balena-os/librsync-go 7457649327d3c2d2e7b7880ea239a03b1b28f7b4 -github.com/balena-os/circbuf 56e73111d0b216a0157b0122dbba22a6bcaba395 +github.com/balena-os/librsync-go 7b435f8f590637e8ba24e72f7cfc2d62f17e3848 # v0.8.5 +github.com/balena-os/circbuf 2d080deeceffbd01dea0fcfa165dce64d2d6c9fc # v0.1.3 # runc github.com/mrunalp/fileutils d7fdd64cc1cabe10bc154ee7d2318b07b7f296ef # v0.5.0 diff --git a/vendor/github.com/balena-os/circbuf/LICENSE b/vendor/github.com/balena-os/circbuf/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/github.com/balena-os/circbuf/README.md b/vendor/github.com/balena-os/circbuf/README.md index f2e356b8d7..b487b79a18 100644 --- a/vendor/github.com/balena-os/circbuf/README.md +++ b/vendor/github.com/balena-os/circbuf/README.md @@ -1,6 +1,12 @@ circbuf ======= +> *About this fork:* This is a fork from https://github.com/armon/circbuf including the following performance optimizations: +> +> * Add methods to efficiently read and write a single byte at a time. +> * Avoid allocating memory on `Bytes()` (at the expense of having a second, pre-allocated buffer) +> * Add a faster code path for buffers whose size is a power-of-two. + This repository provides the `circbuf` package. This provides a `Buffer` object which is a circular (or ring) buffer. It has a fixed size, but can be written to infinitely. Only the last `size` bytes are ever retained. The buffer implements diff --git a/vendor/github.com/balena-os/circbuf/anybuf.go b/vendor/github.com/balena-os/circbuf/anybuf.go new file mode 100644 index 0000000000..57e901c8f9 --- /dev/null +++ b/vendor/github.com/balena-os/circbuf/anybuf.go @@ -0,0 +1,38 @@ +package circbuf + +import ( + "fmt" +) + +// anyBuffer implements a circular buffer of any size. +type anyBuffer struct { + baseBuffer +} + +// Write writes up to len(buf) bytes to the internal ring, +// overriding older data if necessary. +func (b *anyBuffer) Write(buf []byte) (int, error) { + n := b.write(buf) + b.writeCursor = ((b.writeCursor + n) % b.size) + return len(buf), nil +} + +// WriteByte writes a single byte into the buffer. +func (b *anyBuffer) WriteByte(c byte) error { + b.data[b.writeCursor] = c + b.writeCursor = ((b.writeCursor + 1) % b.size) + b.written++ + return nil +} + +// Get returns a single byte out of the buffer, at the given position. +func (b *anyBuffer) Get(i int64) (byte, error) { + switch { + case i >= b.written || i >= b.size: + return 0, fmt.Errorf("Index out of bounds: %v", i) + case b.written > b.size: + return b.data[(b.writeCursor+i)%b.size], nil + default: + return b.data[i], nil + } +} diff --git a/vendor/github.com/balena-os/circbuf/basebuf.go b/vendor/github.com/balena-os/circbuf/basebuf.go new file mode 100644 index 0000000000..a01e4d4689 --- /dev/null +++ b/vendor/github.com/balena-os/circbuf/basebuf.go @@ -0,0 +1,71 @@ +package circbuf + +type baseBuffer struct { + data []byte + out []byte + size int64 + writeCursor int64 + written int64 +} + +// Size returns the size of the buffer +func (b *baseBuffer) Size() int64 { + return b.size +} + +// TotalWritten provides the total number of bytes written +func (b *baseBuffer) TotalWritten() int64 { + return b.written +} + +// Bytes provides a slice of the bytes written. This +// slice should not be written to. The underlying array +// may point to data that will be overwritten by a subsequent +// call to Bytes. It does no allocation. +func (b *baseBuffer) Bytes() []byte { + switch { + case b.written >= b.size && b.writeCursor == 0: + return b.data + case b.written > b.size: + copy(b.out, b.data[b.writeCursor:]) + copy(b.out[b.size-b.writeCursor:], b.data[:b.writeCursor]) + return b.out + default: + return b.data[:b.writeCursor] + } +} + +// Reset resets the buffer so it has no content. +func (b *baseBuffer) Reset() { + b.writeCursor = 0 + b.written = 0 +} + +// String returns the contents of the buffer as a string +func (b *baseBuffer) String() string { + return string(b.Bytes()) +} + +// write writes len(buf) bytes to the circular buffer and returns by how much +// the writeCursor must be incremented. (This function does not increment the +// writeCursor!) +func (b *baseBuffer) write(buf []byte) int64 { + // Account for total bytes written + n := len(buf) + b.written += int64(n) + + // If the buffer is larger than ours, then we only care + // about the last size bytes anyways + if int64(n) > b.size { + buf = buf[int64(n)-b.size:] + } + + // Copy in place + remain := b.size - b.writeCursor + copy(b.data[b.writeCursor:], buf) + if int64(len(buf)) > remain { + copy(b.data, buf[remain:]) + } + + return int64(len(buf)) +} diff --git a/vendor/github.com/balena-os/circbuf/circbuf.go b/vendor/github.com/balena-os/circbuf/circbuf.go index 381e096a71..251e911887 100644 --- a/vendor/github.com/balena-os/circbuf/circbuf.go +++ b/vendor/github.com/balena-os/circbuf/circbuf.go @@ -1,115 +1,66 @@ package circbuf -import ( - "fmt" -) +import "fmt" -// Buffer implements a circular buffer. It is a fixed size, -// and new writes overwrite older data, such that for a buffer -// of size N, for any amount of writes, only the last N bytes -// are retained. -type Buffer struct { - data []byte - out []byte - size int64 - writeCursor int64 - written int64 -} +// Buffer is a circular buffer. It has a fixed size, and new writes overwrite +// older data, such that for a buffer of size N, for any amount of writes, only +// the last N bytes are retained. +type Buffer interface { + // Write writes up to len(buf) bytes to the internal ring, overriding older + // data if necessary. Returns the number of bytes written and any occasional + // error. + Write(buf []byte) (int, error) -// NewBuffer creates a new buffer of a given size. The size -// must be greater than 0. -func NewBuffer(size int64) (*Buffer, error) { - if size <= 0 { - return nil, fmt.Errorf("Size must be positive") - } + // WriteByte writes a single byte into the buffer. + WriteByte(c byte) error - b := &Buffer{ - size: size, - data: make([]byte, size), - out: make([]byte, size), - } - return b, nil -} + // Size returns the size of the buffer + Size() int64 -// Write writes up to len(buf) bytes to the internal ring, -// overriding older data if necessary. -func (b *Buffer) Write(buf []byte) (int, error) { - // Account for total bytes written - n := len(buf) - b.written += int64(n) + // TotalWritten provides the total number of bytes written. + TotalWritten() int64 - // If the buffer is larger than ours, then we only care - // about the last size bytes anyways - if int64(n) > b.size { - buf = buf[int64(n)-b.size:] - } + // Bytes provides a slice of the bytes written. This + // slice should not be written to. The underlying array + // may point to data that will be overwritten by a subsequent + // call to Bytes. It shall do no allocation. + Bytes() []byte - // Copy in place - remain := b.size - b.writeCursor - copy(b.data[b.writeCursor:], buf) - if int64(len(buf)) > remain { - copy(b.data, buf[remain:]) - } + // Get returns a single byte out of the buffer, at the given position. + Get(i int64) (byte, error) - // Update location of the cursor - b.writeCursor = ((b.writeCursor + int64(len(buf))) % b.size) - return n, nil -} + // Reset resets the buffer so it has no content. + Reset() -// WriteByte writes a single byte into the buffer. -func (b *Buffer) WriteByte(c byte) error { - b.data[b.writeCursor] = c - b.writeCursor = ((b.writeCursor + 1) % b.size) - b.written++ - return nil + // String returns the contents of the buffer as a string. + String() string } -// Size returns the size of the buffer -func (b *Buffer) Size() int64 { - return b.size -} - -// TotalWritten provides the total number of bytes written -func (b *Buffer) TotalWritten() int64 { - return b.written -} - -// Bytes provides a slice of the bytes written. This -// slice should not be written to. The underlying array -// may point to data that will be overwritten by a subsequent -// call to Bytes. It does no allocation. -func (b *Buffer) Bytes() []byte { - switch { - case b.written >= b.size && b.writeCursor == 0: - return b.data - case b.written > b.size: - copy(b.out, b.data[b.writeCursor:]) - copy(b.out[b.size-b.writeCursor:], b.data[:b.writeCursor]) - return b.out - default: - return b.data[:b.writeCursor] +// NewBuffer creates a new buffer of a given size. The size +// must be greater than 0. +func NewBuffer(size int64) (Buffer, error) { + if size <= 0 { + return nil, fmt.Errorf("Size must be positive") } -} -// Get returns a single byte out of the buffer, at the given position. -func (b *Buffer) Get(i int64) (byte, error) { - switch { - case i >= b.written || i >= b.size: - return 0, fmt.Errorf("Index out of bounds: %v", i) - case b.written > b.size: - return b.data[(b.writeCursor+i)%b.size], nil - default: - return b.data[i], nil + if (size & (size - 1)) == 0 { + b := &po2Buffer{ + baseBuffer{ + size: size, + data: make([]byte, size), + out: make([]byte, size), + }, + } + return b, nil } -} -// Reset resets the buffer so it has no content. -func (b *Buffer) Reset() { - b.writeCursor = 0 - b.written = 0 -} + b := &anyBuffer{ + baseBuffer{ + size: size, + data: make([]byte, size), + out: make([]byte, size), + }, + } + return b, nil -// String returns the contents of the buffer as a string -func (b *Buffer) String() string { - return string(b.Bytes()) } diff --git a/vendor/github.com/balena-os/circbuf/go.mod b/vendor/github.com/balena-os/circbuf/go.mod new file mode 100644 index 0000000000..913a79a9df --- /dev/null +++ b/vendor/github.com/balena-os/circbuf/go.mod @@ -0,0 +1,3 @@ +module github.com/balena-os/circbuf + +go 1.16 diff --git a/vendor/github.com/balena-os/circbuf/po2buf.go b/vendor/github.com/balena-os/circbuf/po2buf.go new file mode 100644 index 0000000000..4bc286472d --- /dev/null +++ b/vendor/github.com/balena-os/circbuf/po2buf.go @@ -0,0 +1,36 @@ +package circbuf + +import "fmt" + +// po2Buffer implements a circular buffer with a size that is a power of two. +type po2Buffer struct { + baseBuffer +} + +// Write writes up to len(buf) bytes to the internal ring, +// overriding older data if necessary. +func (b *po2Buffer) Write(buf []byte) (int, error) { + n := b.write(buf) + b.writeCursor = ((b.writeCursor + n) & (b.size - 1)) + return len(buf), nil +} + +// WriteByte writes a single byte into the buffer. +func (b *po2Buffer) WriteByte(c byte) error { + b.data[b.writeCursor] = c + b.writeCursor = ((b.writeCursor + 1) & (b.size - 1)) + b.written++ + return nil +} + +// Get returns a single byte out of the buffer, at the given position. +func (b *po2Buffer) Get(i int64) (byte, error) { + switch { + case i >= b.written || i >= b.size: + return 0, fmt.Errorf("Index out of bounds: %v", i) + case b.written > b.size: + return b.data[(b.writeCursor+i)&(b.size-1)], nil + default: + return b.data[i], nil + } +} diff --git a/vendor/github.com/balena-os/librsync-go/README.md b/vendor/github.com/balena-os/librsync-go/README.md index 6059000386..521df1e76d 100644 --- a/vendor/github.com/balena-os/librsync-go/README.md +++ b/vendor/github.com/balena-os/librsync-go/README.md @@ -1,15 +1,30 @@ -librsync-go -========= +# librsync-go librsync-go is a reimplementation of [librsync](https://github.com/librsync/librsync) in Go. -Installing ----------- +## Installing To install the rdiff utility: -``` +```sh go install github.com/balena-os/librsync-go/cmd/rdiff ``` To use it as a library simply include `github.com/balena-os/librsync-go` in your import statement + +## Contributing + +If you're interested in contributing, that's awesome! + +### Pull requests + +Here's a few guidelines to make the process easier for everyone involved. + +- We use [Versionist](https://github.com/product-os/versionist) to manage + versioning (and in particular, [semantic versioning](https://semver.org)) and + generate the changelog for this project. +- At least one commit in a PR should have a `Change-Type: type` footer, where + `type` can be `patch`, `minor` or `major`. The subject of this commit will be + added to the changelog. +- Commits should be squashed as much as makes sense. +- Commits should be signed-off (`git commit -s`) diff --git a/vendor/github.com/balena-os/librsync-go/delta.go b/vendor/github.com/balena-os/librsync-go/delta.go index 60a83d0629..0ed3183fe9 100644 --- a/vendor/github.com/balena-os/librsync-go/delta.go +++ b/vendor/github.com/balena-os/librsync-go/delta.go @@ -4,12 +4,36 @@ import ( "bufio" "bytes" "encoding/binary" + "fmt" "io" "github.com/balena-os/circbuf" ) func Delta(sig *SignatureType, i io.Reader, output io.Writer) error { + buff := make([]byte, 0, OUTPUT_BUFFER_SIZE) + return DeltaBuff(sig, i, output, buff) +} + +// DeltaBuff like Delta but allows to pass literal buffer slice. +// This is useful for efficient computation of multiple deltas. +// +// The slice shall have zero size, and capacity of OUTPUT_BUFFER_SIZE. +// +// Example of usage: +// var files []string +// var litBuff = make([]byte, 0, OUTPUT_BUFFER_SIZE) +// for _, file := range files { +// f, _ := os.Open(file) +// sig, _ := ReadSignatureFile(file + ".sig") +// delta, _ := os.OpenFile(file+".delta", os.O_CREATE|os.O_WRONLY, 0644) +// _ = DeltaBuff(sig, f, delta, litBuff) +// } +func DeltaBuff(sig *SignatureType, i io.Reader, output io.Writer, litBuff []byte) error { + if len(litBuff) != 0 || cap(litBuff) != OUTPUT_BUFFER_SIZE { + return fmt.Errorf("bad literal buffer") + } + input := bufio.NewReader(i) err := binary.Write(output, binary.BigEndian, DELTA_MAGIC) @@ -18,15 +42,12 @@ func Delta(sig *SignatureType, i io.Reader, output io.Writer) error { } prevByte := byte(0) - m := match{output: output} + m := newMatch(output, litBuff) weakSum := NewRollsum() block, _ := circbuf.NewBuffer(int64(sig.blockLen)) - block.WriteByte(0) - pos := 0 for { - pos += 1 in, err := input.ReadByte() if err == io.EOF { break diff --git a/vendor/github.com/balena-os/librsync-go/go.mod b/vendor/github.com/balena-os/librsync-go/go.mod index bc43c79b85..6e133c4c16 100644 --- a/vendor/github.com/balena-os/librsync-go/go.mod +++ b/vendor/github.com/balena-os/librsync-go/go.mod @@ -1,9 +1,20 @@ module github.com/balena-os/librsync-go +go 1.17 + +require ( + github.com/balena-os/circbuf v0.1.3 + github.com/sirupsen/logrus v1.9.0 + github.com/stretchr/testify v1.8.1 + github.com/urfave/cli v1.22.12 + golang.org/x/crypto v0.7.0 +) + require ( - github.com/balena-os/circbuf v0.0.0-20171122095043-56e73111d0b2 - github.com/sirupsen/logrus v1.3.0 - github.com/urfave/cli v1.20.0 - golang.org/x/crypto v0.0.0-20190122013713-64072686203f - golang.org/x/sys v0.0.0-20190122071731-054c452bb702 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + golang.org/x/sys v0.6.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/vendor/github.com/balena-os/librsync-go/match.go b/vendor/github.com/balena-os/librsync-go/match.go index 95b220f94d..9cab324a55 100644 --- a/vendor/github.com/balena-os/librsync-go/match.go +++ b/vendor/github.com/balena-os/librsync-go/match.go @@ -13,6 +13,11 @@ const ( MATCH_KIND_COPY ) +// Size of the output buffer in bytes. We'll flush the match once it gets this +// large. As consequence, this is the maximum size of a LITERAL command we'll +// generate on our deltas. +const OUTPUT_BUFFER_SIZE = 16 * 1024 * 1024 + type match struct { kind matchKind pos uint64 @@ -34,6 +39,13 @@ func intSize(d uint64) uint8 { } } +func newMatch(output io.Writer, buff []byte) match { + return match{ + output: output, + lit: buff, + } +} + func (m *match) write(d uint64, size uint8) error { switch size { case 1: @@ -112,8 +124,11 @@ func (m *match) flush() error { if err != nil { return err } - m.output.Write(m.lit) - m.lit = []byte{} + _, err = m.output.Write(m.lit) + if err != nil { + return err + } + m.lit = m.lit[:0] // reuse the same buffer } m.pos = 0 m.len = 0 @@ -134,8 +149,13 @@ func (m *match) add(kind matchKind, pos, len uint64) error { case MATCH_KIND_LITERAL: m.lit = append(m.lit, byte(pos)) m.len += 1 + if m.len >= OUTPUT_BUFFER_SIZE { + err := m.flush() + if err != nil { + return err + } + } case MATCH_KIND_COPY: - m.lit = []byte{} if m.pos+m.len != pos { err := m.flush() if err != nil { diff --git a/vendor/github.com/balena-os/librsync-go/op.go b/vendor/github.com/balena-os/librsync-go/op.go index 38934d5da9..94cc7ce273 100644 --- a/vendor/github.com/balena-os/librsync-go/op.go +++ b/vendor/github.com/balena-os/librsync-go/op.go @@ -280,260 +280,260 @@ const ( ) var op2cmd = []Command{ - Command{KIND_END, 0, 0, 0}, /* OP_END = 0 */ - Command{KIND_LITERAL, 1, 0, 0}, /* OP_LITERAL_1 = 0x1 */ - Command{KIND_LITERAL, 2, 0, 0}, /* OP_LITERAL_2 = 0x2 */ - Command{KIND_LITERAL, 3, 0, 0}, /* OP_LITERAL_3 = 0x3 */ - Command{KIND_LITERAL, 4, 0, 0}, /* OP_LITERAL_4 = 0x4 */ - Command{KIND_LITERAL, 5, 0, 0}, /* OP_LITERAL_5 = 0x5 */ - Command{KIND_LITERAL, 6, 0, 0}, /* OP_LITERAL_6 = 0x6 */ - Command{KIND_LITERAL, 7, 0, 0}, /* OP_LITERAL_7 = 0x7 */ - Command{KIND_LITERAL, 8, 0, 0}, /* OP_LITERAL_8 = 0x8 */ - Command{KIND_LITERAL, 9, 0, 0}, /* OP_LITERAL_9 = 0x9 */ - Command{KIND_LITERAL, 10, 0, 0}, /* OP_LITERAL_10 = 0xa */ - Command{KIND_LITERAL, 11, 0, 0}, /* OP_LITERAL_11 = 0xb */ - Command{KIND_LITERAL, 12, 0, 0}, /* OP_LITERAL_12 = 0xc */ - Command{KIND_LITERAL, 13, 0, 0}, /* OP_LITERAL_13 = 0xd */ - Command{KIND_LITERAL, 14, 0, 0}, /* OP_LITERAL_14 = 0xe */ - Command{KIND_LITERAL, 15, 0, 0}, /* OP_LITERAL_15 = 0xf */ - Command{KIND_LITERAL, 16, 0, 0}, /* OP_LITERAL_16 = 0x10 */ - Command{KIND_LITERAL, 17, 0, 0}, /* OP_LITERAL_17 = 0x11 */ - Command{KIND_LITERAL, 18, 0, 0}, /* OP_LITERAL_18 = 0x12 */ - Command{KIND_LITERAL, 19, 0, 0}, /* OP_LITERAL_19 = 0x13 */ - Command{KIND_LITERAL, 20, 0, 0}, /* OP_LITERAL_20 = 0x14 */ - Command{KIND_LITERAL, 21, 0, 0}, /* OP_LITERAL_21 = 0x15 */ - Command{KIND_LITERAL, 22, 0, 0}, /* OP_LITERAL_22 = 0x16 */ - Command{KIND_LITERAL, 23, 0, 0}, /* OP_LITERAL_23 = 0x17 */ - Command{KIND_LITERAL, 24, 0, 0}, /* OP_LITERAL_24 = 0x18 */ - Command{KIND_LITERAL, 25, 0, 0}, /* OP_LITERAL_25 = 0x19 */ - Command{KIND_LITERAL, 26, 0, 0}, /* OP_LITERAL_26 = 0x1a */ - Command{KIND_LITERAL, 27, 0, 0}, /* OP_LITERAL_27 = 0x1b */ - Command{KIND_LITERAL, 28, 0, 0}, /* OP_LITERAL_28 = 0x1c */ - Command{KIND_LITERAL, 29, 0, 0}, /* OP_LITERAL_29 = 0x1d */ - Command{KIND_LITERAL, 30, 0, 0}, /* OP_LITERAL_30 = 0x1e */ - Command{KIND_LITERAL, 31, 0, 0}, /* OP_LITERAL_31 = 0x1f */ - Command{KIND_LITERAL, 32, 0, 0}, /* OP_LITERAL_32 = 0x20 */ - Command{KIND_LITERAL, 33, 0, 0}, /* OP_LITERAL_33 = 0x21 */ - Command{KIND_LITERAL, 34, 0, 0}, /* OP_LITERAL_34 = 0x22 */ - Command{KIND_LITERAL, 35, 0, 0}, /* OP_LITERAL_35 = 0x23 */ - Command{KIND_LITERAL, 36, 0, 0}, /* OP_LITERAL_36 = 0x24 */ - Command{KIND_LITERAL, 37, 0, 0}, /* OP_LITERAL_37 = 0x25 */ - Command{KIND_LITERAL, 38, 0, 0}, /* OP_LITERAL_38 = 0x26 */ - Command{KIND_LITERAL, 39, 0, 0}, /* OP_LITERAL_39 = 0x27 */ - Command{KIND_LITERAL, 40, 0, 0}, /* OP_LITERAL_40 = 0x28 */ - Command{KIND_LITERAL, 41, 0, 0}, /* OP_LITERAL_41 = 0x29 */ - Command{KIND_LITERAL, 42, 0, 0}, /* OP_LITERAL_42 = 0x2a */ - Command{KIND_LITERAL, 43, 0, 0}, /* OP_LITERAL_43 = 0x2b */ - Command{KIND_LITERAL, 44, 0, 0}, /* OP_LITERAL_44 = 0x2c */ - Command{KIND_LITERAL, 45, 0, 0}, /* OP_LITERAL_45 = 0x2d */ - Command{KIND_LITERAL, 46, 0, 0}, /* OP_LITERAL_46 = 0x2e */ - Command{KIND_LITERAL, 47, 0, 0}, /* OP_LITERAL_47 = 0x2f */ - Command{KIND_LITERAL, 48, 0, 0}, /* OP_LITERAL_48 = 0x30 */ - Command{KIND_LITERAL, 49, 0, 0}, /* OP_LITERAL_49 = 0x31 */ - Command{KIND_LITERAL, 50, 0, 0}, /* OP_LITERAL_50 = 0x32 */ - Command{KIND_LITERAL, 51, 0, 0}, /* OP_LITERAL_51 = 0x33 */ - Command{KIND_LITERAL, 52, 0, 0}, /* OP_LITERAL_52 = 0x34 */ - Command{KIND_LITERAL, 53, 0, 0}, /* OP_LITERAL_53 = 0x35 */ - Command{KIND_LITERAL, 54, 0, 0}, /* OP_LITERAL_54 = 0x36 */ - Command{KIND_LITERAL, 55, 0, 0}, /* OP_LITERAL_55 = 0x37 */ - Command{KIND_LITERAL, 56, 0, 0}, /* OP_LITERAL_56 = 0x38 */ - Command{KIND_LITERAL, 57, 0, 0}, /* OP_LITERAL_57 = 0x39 */ - Command{KIND_LITERAL, 58, 0, 0}, /* OP_LITERAL_58 = 0x3a */ - Command{KIND_LITERAL, 59, 0, 0}, /* OP_LITERAL_59 = 0x3b */ - Command{KIND_LITERAL, 60, 0, 0}, /* OP_LITERAL_60 = 0x3c */ - Command{KIND_LITERAL, 61, 0, 0}, /* OP_LITERAL_61 = 0x3d */ - Command{KIND_LITERAL, 62, 0, 0}, /* OP_LITERAL_62 = 0x3e */ - Command{KIND_LITERAL, 63, 0, 0}, /* OP_LITERAL_63 = 0x3f */ - Command{KIND_LITERAL, 64, 0, 0}, /* OP_LITERAL_64 = 0x40 */ - Command{KIND_LITERAL, 0, 1, 0}, /* OP_LITERAL_N1 = 0x41 */ - Command{KIND_LITERAL, 0, 2, 0}, /* OP_LITERAL_N2 = 0x42 */ - Command{KIND_LITERAL, 0, 4, 0}, /* OP_LITERAL_N4 = 0x43 */ - Command{KIND_LITERAL, 0, 8, 0}, /* OP_LITERAL_N8 = 0x44 */ - Command{KIND_COPY, 0, 1, 1}, /* OP_COPY_N1_N1 = 0x45 */ - Command{KIND_COPY, 0, 1, 2}, /* OP_COPY_N1_N2 = 0x46 */ - Command{KIND_COPY, 0, 1, 4}, /* OP_COPY_N1_N4 = 0x47 */ - Command{KIND_COPY, 0, 1, 8}, /* OP_COPY_N1_N8 = 0x48 */ - Command{KIND_COPY, 0, 2, 1}, /* OP_COPY_N2_N1 = 0x49 */ - Command{KIND_COPY, 0, 2, 2}, /* OP_COPY_N2_N2 = 0x4a */ - Command{KIND_COPY, 0, 2, 4}, /* OP_COPY_N2_N4 = 0x4b */ - Command{KIND_COPY, 0, 2, 8}, /* OP_COPY_N2_N8 = 0x4c */ - Command{KIND_COPY, 0, 4, 1}, /* OP_COPY_N4_N1 = 0x4d */ - Command{KIND_COPY, 0, 4, 2}, /* OP_COPY_N4_N2 = 0x4e */ - Command{KIND_COPY, 0, 4, 4}, /* OP_COPY_N4_N4 = 0x4f */ - Command{KIND_COPY, 0, 4, 8}, /* OP_COPY_N4_N8 = 0x50 */ - Command{KIND_COPY, 0, 8, 1}, /* OP_COPY_N8_N1 = 0x51 */ - Command{KIND_COPY, 0, 8, 2}, /* OP_COPY_N8_N2 = 0x52 */ - Command{KIND_COPY, 0, 8, 4}, /* OP_COPY_N8_N4 = 0x53 */ - Command{KIND_COPY, 0, 8, 8}, /* OP_COPY_N8_N8 = 0x54 */ - Command{KIND_RESERVED, 85, 0, 0}, /* OP_RESERVED_85 = 0x55 */ - Command{KIND_RESERVED, 86, 0, 0}, /* OP_RESERVED_86 = 0x56 */ - Command{KIND_RESERVED, 87, 0, 0}, /* OP_RESERVED_87 = 0x57 */ - Command{KIND_RESERVED, 88, 0, 0}, /* OP_RESERVED_88 = 0x58 */ - Command{KIND_RESERVED, 89, 0, 0}, /* OP_RESERVED_89 = 0x59 */ - Command{KIND_RESERVED, 90, 0, 0}, /* OP_RESERVED_90 = 0x5a */ - Command{KIND_RESERVED, 91, 0, 0}, /* OP_RESERVED_91 = 0x5b */ - Command{KIND_RESERVED, 92, 0, 0}, /* OP_RESERVED_92 = 0x5c */ - Command{KIND_RESERVED, 93, 0, 0}, /* OP_RESERVED_93 = 0x5d */ - Command{KIND_RESERVED, 94, 0, 0}, /* OP_RESERVED_94 = 0x5e */ - Command{KIND_RESERVED, 95, 0, 0}, /* OP_RESERVED_95 = 0x5f */ - Command{KIND_RESERVED, 96, 0, 0}, /* OP_RESERVED_96 = 0x60 */ - Command{KIND_RESERVED, 97, 0, 0}, /* OP_RESERVED_97 = 0x61 */ - Command{KIND_RESERVED, 98, 0, 0}, /* OP_RESERVED_98 = 0x62 */ - Command{KIND_RESERVED, 99, 0, 0}, /* OP_RESERVED_99 = 0x63 */ - Command{KIND_RESERVED, 100, 0, 0}, /* OP_RESERVED_100 = 0x64 */ - Command{KIND_RESERVED, 101, 0, 0}, /* OP_RESERVED_101 = 0x65 */ - Command{KIND_RESERVED, 102, 0, 0}, /* OP_RESERVED_102 = 0x66 */ - Command{KIND_RESERVED, 103, 0, 0}, /* OP_RESERVED_103 = 0x67 */ - Command{KIND_RESERVED, 104, 0, 0}, /* OP_RESERVED_104 = 0x68 */ - Command{KIND_RESERVED, 105, 0, 0}, /* OP_RESERVED_105 = 0x69 */ - Command{KIND_RESERVED, 106, 0, 0}, /* OP_RESERVED_106 = 0x6a */ - Command{KIND_RESERVED, 107, 0, 0}, /* OP_RESERVED_107 = 0x6b */ - Command{KIND_RESERVED, 108, 0, 0}, /* OP_RESERVED_108 = 0x6c */ - Command{KIND_RESERVED, 109, 0, 0}, /* OP_RESERVED_109 = 0x6d */ - Command{KIND_RESERVED, 110, 0, 0}, /* OP_RESERVED_110 = 0x6e */ - Command{KIND_RESERVED, 111, 0, 0}, /* OP_RESERVED_111 = 0x6f */ - Command{KIND_RESERVED, 112, 0, 0}, /* OP_RESERVED_112 = 0x70 */ - Command{KIND_RESERVED, 113, 0, 0}, /* OP_RESERVED_113 = 0x71 */ - Command{KIND_RESERVED, 114, 0, 0}, /* OP_RESERVED_114 = 0x72 */ - Command{KIND_RESERVED, 115, 0, 0}, /* OP_RESERVED_115 = 0x73 */ - Command{KIND_RESERVED, 116, 0, 0}, /* OP_RESERVED_116 = 0x74 */ - Command{KIND_RESERVED, 117, 0, 0}, /* OP_RESERVED_117 = 0x75 */ - Command{KIND_RESERVED, 118, 0, 0}, /* OP_RESERVED_118 = 0x76 */ - Command{KIND_RESERVED, 119, 0, 0}, /* OP_RESERVED_119 = 0x77 */ - Command{KIND_RESERVED, 120, 0, 0}, /* OP_RESERVED_120 = 0x78 */ - Command{KIND_RESERVED, 121, 0, 0}, /* OP_RESERVED_121 = 0x79 */ - Command{KIND_RESERVED, 122, 0, 0}, /* OP_RESERVED_122 = 0x7a */ - Command{KIND_RESERVED, 123, 0, 0}, /* OP_RESERVED_123 = 0x7b */ - Command{KIND_RESERVED, 124, 0, 0}, /* OP_RESERVED_124 = 0x7c */ - Command{KIND_RESERVED, 125, 0, 0}, /* OP_RESERVED_125 = 0x7d */ - Command{KIND_RESERVED, 126, 0, 0}, /* OP_RESERVED_126 = 0x7e */ - Command{KIND_RESERVED, 127, 0, 0}, /* OP_RESERVED_127 = 0x7f */ - Command{KIND_RESERVED, 128, 0, 0}, /* OP_RESERVED_128 = 0x80 */ - Command{KIND_RESERVED, 129, 0, 0}, /* OP_RESERVED_129 = 0x81 */ - Command{KIND_RESERVED, 130, 0, 0}, /* OP_RESERVED_130 = 0x82 */ - Command{KIND_RESERVED, 131, 0, 0}, /* OP_RESERVED_131 = 0x83 */ - Command{KIND_RESERVED, 132, 0, 0}, /* OP_RESERVED_132 = 0x84 */ - Command{KIND_RESERVED, 133, 0, 0}, /* OP_RESERVED_133 = 0x85 */ - Command{KIND_RESERVED, 134, 0, 0}, /* OP_RESERVED_134 = 0x86 */ - Command{KIND_RESERVED, 135, 0, 0}, /* OP_RESERVED_135 = 0x87 */ - Command{KIND_RESERVED, 136, 0, 0}, /* OP_RESERVED_136 = 0x88 */ - Command{KIND_RESERVED, 137, 0, 0}, /* OP_RESERVED_137 = 0x89 */ - Command{KIND_RESERVED, 138, 0, 0}, /* OP_RESERVED_138 = 0x8a */ - Command{KIND_RESERVED, 139, 0, 0}, /* OP_RESERVED_139 = 0x8b */ - Command{KIND_RESERVED, 140, 0, 0}, /* OP_RESERVED_140 = 0x8c */ - Command{KIND_RESERVED, 141, 0, 0}, /* OP_RESERVED_141 = 0x8d */ - Command{KIND_RESERVED, 142, 0, 0}, /* OP_RESERVED_142 = 0x8e */ - Command{KIND_RESERVED, 143, 0, 0}, /* OP_RESERVED_143 = 0x8f */ - Command{KIND_RESERVED, 144, 0, 0}, /* OP_RESERVED_144 = 0x90 */ - Command{KIND_RESERVED, 145, 0, 0}, /* OP_RESERVED_145 = 0x91 */ - Command{KIND_RESERVED, 146, 0, 0}, /* OP_RESERVED_146 = 0x92 */ - Command{KIND_RESERVED, 147, 0, 0}, /* OP_RESERVED_147 = 0x93 */ - Command{KIND_RESERVED, 148, 0, 0}, /* OP_RESERVED_148 = 0x94 */ - Command{KIND_RESERVED, 149, 0, 0}, /* OP_RESERVED_149 = 0x95 */ - Command{KIND_RESERVED, 150, 0, 0}, /* OP_RESERVED_150 = 0x96 */ - Command{KIND_RESERVED, 151, 0, 0}, /* OP_RESERVED_151 = 0x97 */ - Command{KIND_RESERVED, 152, 0, 0}, /* OP_RESERVED_152 = 0x98 */ - Command{KIND_RESERVED, 153, 0, 0}, /* OP_RESERVED_153 = 0x99 */ - Command{KIND_RESERVED, 154, 0, 0}, /* OP_RESERVED_154 = 0x9a */ - Command{KIND_RESERVED, 155, 0, 0}, /* OP_RESERVED_155 = 0x9b */ - Command{KIND_RESERVED, 156, 0, 0}, /* OP_RESERVED_156 = 0x9c */ - Command{KIND_RESERVED, 157, 0, 0}, /* OP_RESERVED_157 = 0x9d */ - Command{KIND_RESERVED, 158, 0, 0}, /* OP_RESERVED_158 = 0x9e */ - Command{KIND_RESERVED, 159, 0, 0}, /* OP_RESERVED_159 = 0x9f */ - Command{KIND_RESERVED, 160, 0, 0}, /* OP_RESERVED_160 = 0xa0 */ - Command{KIND_RESERVED, 161, 0, 0}, /* OP_RESERVED_161 = 0xa1 */ - Command{KIND_RESERVED, 162, 0, 0}, /* OP_RESERVED_162 = 0xa2 */ - Command{KIND_RESERVED, 163, 0, 0}, /* OP_RESERVED_163 = 0xa3 */ - Command{KIND_RESERVED, 164, 0, 0}, /* OP_RESERVED_164 = 0xa4 */ - Command{KIND_RESERVED, 165, 0, 0}, /* OP_RESERVED_165 = 0xa5 */ - Command{KIND_RESERVED, 166, 0, 0}, /* OP_RESERVED_166 = 0xa6 */ - Command{KIND_RESERVED, 167, 0, 0}, /* OP_RESERVED_167 = 0xa7 */ - Command{KIND_RESERVED, 168, 0, 0}, /* OP_RESERVED_168 = 0xa8 */ - Command{KIND_RESERVED, 169, 0, 0}, /* OP_RESERVED_169 = 0xa9 */ - Command{KIND_RESERVED, 170, 0, 0}, /* OP_RESERVED_170 = 0xaa */ - Command{KIND_RESERVED, 171, 0, 0}, /* OP_RESERVED_171 = 0xab */ - Command{KIND_RESERVED, 172, 0, 0}, /* OP_RESERVED_172 = 0xac */ - Command{KIND_RESERVED, 173, 0, 0}, /* OP_RESERVED_173 = 0xad */ - Command{KIND_RESERVED, 174, 0, 0}, /* OP_RESERVED_174 = 0xae */ - Command{KIND_RESERVED, 175, 0, 0}, /* OP_RESERVED_175 = 0xaf */ - Command{KIND_RESERVED, 176, 0, 0}, /* OP_RESERVED_176 = 0xb0 */ - Command{KIND_RESERVED, 177, 0, 0}, /* OP_RESERVED_177 = 0xb1 */ - Command{KIND_RESERVED, 178, 0, 0}, /* OP_RESERVED_178 = 0xb2 */ - Command{KIND_RESERVED, 179, 0, 0}, /* OP_RESERVED_179 = 0xb3 */ - Command{KIND_RESERVED, 180, 0, 0}, /* OP_RESERVED_180 = 0xb4 */ - Command{KIND_RESERVED, 181, 0, 0}, /* OP_RESERVED_181 = 0xb5 */ - Command{KIND_RESERVED, 182, 0, 0}, /* OP_RESERVED_182 = 0xb6 */ - Command{KIND_RESERVED, 183, 0, 0}, /* OP_RESERVED_183 = 0xb7 */ - Command{KIND_RESERVED, 184, 0, 0}, /* OP_RESERVED_184 = 0xb8 */ - Command{KIND_RESERVED, 185, 0, 0}, /* OP_RESERVED_185 = 0xb9 */ - Command{KIND_RESERVED, 186, 0, 0}, /* OP_RESERVED_186 = 0xba */ - Command{KIND_RESERVED, 187, 0, 0}, /* OP_RESERVED_187 = 0xbb */ - Command{KIND_RESERVED, 188, 0, 0}, /* OP_RESERVED_188 = 0xbc */ - Command{KIND_RESERVED, 189, 0, 0}, /* OP_RESERVED_189 = 0xbd */ - Command{KIND_RESERVED, 190, 0, 0}, /* OP_RESERVED_190 = 0xbe */ - Command{KIND_RESERVED, 191, 0, 0}, /* OP_RESERVED_191 = 0xbf */ - Command{KIND_RESERVED, 192, 0, 0}, /* OP_RESERVED_192 = 0xc0 */ - Command{KIND_RESERVED, 193, 0, 0}, /* OP_RESERVED_193 = 0xc1 */ - Command{KIND_RESERVED, 194, 0, 0}, /* OP_RESERVED_194 = 0xc2 */ - Command{KIND_RESERVED, 195, 0, 0}, /* OP_RESERVED_195 = 0xc3 */ - Command{KIND_RESERVED, 196, 0, 0}, /* OP_RESERVED_196 = 0xc4 */ - Command{KIND_RESERVED, 197, 0, 0}, /* OP_RESERVED_197 = 0xc5 */ - Command{KIND_RESERVED, 198, 0, 0}, /* OP_RESERVED_198 = 0xc6 */ - Command{KIND_RESERVED, 199, 0, 0}, /* OP_RESERVED_199 = 0xc7 */ - Command{KIND_RESERVED, 200, 0, 0}, /* OP_RESERVED_200 = 0xc8 */ - Command{KIND_RESERVED, 201, 0, 0}, /* OP_RESERVED_201 = 0xc9 */ - Command{KIND_RESERVED, 202, 0, 0}, /* OP_RESERVED_202 = 0xca */ - Command{KIND_RESERVED, 203, 0, 0}, /* OP_RESERVED_203 = 0xcb */ - Command{KIND_RESERVED, 204, 0, 0}, /* OP_RESERVED_204 = 0xcc */ - Command{KIND_RESERVED, 205, 0, 0}, /* OP_RESERVED_205 = 0xcd */ - Command{KIND_RESERVED, 206, 0, 0}, /* OP_RESERVED_206 = 0xce */ - Command{KIND_RESERVED, 207, 0, 0}, /* OP_RESERVED_207 = 0xcf */ - Command{KIND_RESERVED, 208, 0, 0}, /* OP_RESERVED_208 = 0xd0 */ - Command{KIND_RESERVED, 209, 0, 0}, /* OP_RESERVED_209 = 0xd1 */ - Command{KIND_RESERVED, 210, 0, 0}, /* OP_RESERVED_210 = 0xd2 */ - Command{KIND_RESERVED, 211, 0, 0}, /* OP_RESERVED_211 = 0xd3 */ - Command{KIND_RESERVED, 212, 0, 0}, /* OP_RESERVED_212 = 0xd4 */ - Command{KIND_RESERVED, 213, 0, 0}, /* OP_RESERVED_213 = 0xd5 */ - Command{KIND_RESERVED, 214, 0, 0}, /* OP_RESERVED_214 = 0xd6 */ - Command{KIND_RESERVED, 215, 0, 0}, /* OP_RESERVED_215 = 0xd7 */ - Command{KIND_RESERVED, 216, 0, 0}, /* OP_RESERVED_216 = 0xd8 */ - Command{KIND_RESERVED, 217, 0, 0}, /* OP_RESERVED_217 = 0xd9 */ - Command{KIND_RESERVED, 218, 0, 0}, /* OP_RESERVED_218 = 0xda */ - Command{KIND_RESERVED, 219, 0, 0}, /* OP_RESERVED_219 = 0xdb */ - Command{KIND_RESERVED, 220, 0, 0}, /* OP_RESERVED_220 = 0xdc */ - Command{KIND_RESERVED, 221, 0, 0}, /* OP_RESERVED_221 = 0xdd */ - Command{KIND_RESERVED, 222, 0, 0}, /* OP_RESERVED_222 = 0xde */ - Command{KIND_RESERVED, 223, 0, 0}, /* OP_RESERVED_223 = 0xdf */ - Command{KIND_RESERVED, 224, 0, 0}, /* OP_RESERVED_224 = 0xe0 */ - Command{KIND_RESERVED, 225, 0, 0}, /* OP_RESERVED_225 = 0xe1 */ - Command{KIND_RESERVED, 226, 0, 0}, /* OP_RESERVED_226 = 0xe2 */ - Command{KIND_RESERVED, 227, 0, 0}, /* OP_RESERVED_227 = 0xe3 */ - Command{KIND_RESERVED, 228, 0, 0}, /* OP_RESERVED_228 = 0xe4 */ - Command{KIND_RESERVED, 229, 0, 0}, /* OP_RESERVED_229 = 0xe5 */ - Command{KIND_RESERVED, 230, 0, 0}, /* OP_RESERVED_230 = 0xe6 */ - Command{KIND_RESERVED, 231, 0, 0}, /* OP_RESERVED_231 = 0xe7 */ - Command{KIND_RESERVED, 232, 0, 0}, /* OP_RESERVED_232 = 0xe8 */ - Command{KIND_RESERVED, 233, 0, 0}, /* OP_RESERVED_233 = 0xe9 */ - Command{KIND_RESERVED, 234, 0, 0}, /* OP_RESERVED_234 = 0xea */ - Command{KIND_RESERVED, 235, 0, 0}, /* OP_RESERVED_235 = 0xeb */ - Command{KIND_RESERVED, 236, 0, 0}, /* OP_RESERVED_236 = 0xec */ - Command{KIND_RESERVED, 237, 0, 0}, /* OP_RESERVED_237 = 0xed */ - Command{KIND_RESERVED, 238, 0, 0}, /* OP_RESERVED_238 = 0xee */ - Command{KIND_RESERVED, 239, 0, 0}, /* OP_RESERVED_239 = 0xef */ - Command{KIND_RESERVED, 240, 0, 0}, /* OP_RESERVED_240 = 0xf0 */ - Command{KIND_RESERVED, 241, 0, 0}, /* OP_RESERVED_241 = 0xf1 */ - Command{KIND_RESERVED, 242, 0, 0}, /* OP_RESERVED_242 = 0xf2 */ - Command{KIND_RESERVED, 243, 0, 0}, /* OP_RESERVED_243 = 0xf3 */ - Command{KIND_RESERVED, 244, 0, 0}, /* OP_RESERVED_244 = 0xf4 */ - Command{KIND_RESERVED, 245, 0, 0}, /* OP_RESERVED_245 = 0xf5 */ - Command{KIND_RESERVED, 246, 0, 0}, /* OP_RESERVED_246 = 0xf6 */ - Command{KIND_RESERVED, 247, 0, 0}, /* OP_RESERVED_247 = 0xf7 */ - Command{KIND_RESERVED, 248, 0, 0}, /* OP_RESERVED_248 = 0xf8 */ - Command{KIND_RESERVED, 249, 0, 0}, /* OP_RESERVED_249 = 0xf9 */ - Command{KIND_RESERVED, 250, 0, 0}, /* OP_RESERVED_250 = 0xfa */ - Command{KIND_RESERVED, 251, 0, 0}, /* OP_RESERVED_251 = 0xfb */ - Command{KIND_RESERVED, 252, 0, 0}, /* OP_RESERVED_252 = 0xfc */ - Command{KIND_RESERVED, 253, 0, 0}, /* OP_RESERVED_253 = 0xfd */ - Command{KIND_RESERVED, 254, 0, 0}, /* OP_RESERVED_254 = 0xfe */ - Command{KIND_RESERVED, 255, 0, 0}, /* OP_RESERVED_255 = 0xff */ + {KIND_END, 0, 0, 0}, /* OP_END = 0 */ + {KIND_LITERAL, 1, 0, 0}, /* OP_LITERAL_1 = 0x1 */ + {KIND_LITERAL, 2, 0, 0}, /* OP_LITERAL_2 = 0x2 */ + {KIND_LITERAL, 3, 0, 0}, /* OP_LITERAL_3 = 0x3 */ + {KIND_LITERAL, 4, 0, 0}, /* OP_LITERAL_4 = 0x4 */ + {KIND_LITERAL, 5, 0, 0}, /* OP_LITERAL_5 = 0x5 */ + {KIND_LITERAL, 6, 0, 0}, /* OP_LITERAL_6 = 0x6 */ + {KIND_LITERAL, 7, 0, 0}, /* OP_LITERAL_7 = 0x7 */ + {KIND_LITERAL, 8, 0, 0}, /* OP_LITERAL_8 = 0x8 */ + {KIND_LITERAL, 9, 0, 0}, /* OP_LITERAL_9 = 0x9 */ + {KIND_LITERAL, 10, 0, 0}, /* OP_LITERAL_10 = 0xa */ + {KIND_LITERAL, 11, 0, 0}, /* OP_LITERAL_11 = 0xb */ + {KIND_LITERAL, 12, 0, 0}, /* OP_LITERAL_12 = 0xc */ + {KIND_LITERAL, 13, 0, 0}, /* OP_LITERAL_13 = 0xd */ + {KIND_LITERAL, 14, 0, 0}, /* OP_LITERAL_14 = 0xe */ + {KIND_LITERAL, 15, 0, 0}, /* OP_LITERAL_15 = 0xf */ + {KIND_LITERAL, 16, 0, 0}, /* OP_LITERAL_16 = 0x10 */ + {KIND_LITERAL, 17, 0, 0}, /* OP_LITERAL_17 = 0x11 */ + {KIND_LITERAL, 18, 0, 0}, /* OP_LITERAL_18 = 0x12 */ + {KIND_LITERAL, 19, 0, 0}, /* OP_LITERAL_19 = 0x13 */ + {KIND_LITERAL, 20, 0, 0}, /* OP_LITERAL_20 = 0x14 */ + {KIND_LITERAL, 21, 0, 0}, /* OP_LITERAL_21 = 0x15 */ + {KIND_LITERAL, 22, 0, 0}, /* OP_LITERAL_22 = 0x16 */ + {KIND_LITERAL, 23, 0, 0}, /* OP_LITERAL_23 = 0x17 */ + {KIND_LITERAL, 24, 0, 0}, /* OP_LITERAL_24 = 0x18 */ + {KIND_LITERAL, 25, 0, 0}, /* OP_LITERAL_25 = 0x19 */ + {KIND_LITERAL, 26, 0, 0}, /* OP_LITERAL_26 = 0x1a */ + {KIND_LITERAL, 27, 0, 0}, /* OP_LITERAL_27 = 0x1b */ + {KIND_LITERAL, 28, 0, 0}, /* OP_LITERAL_28 = 0x1c */ + {KIND_LITERAL, 29, 0, 0}, /* OP_LITERAL_29 = 0x1d */ + {KIND_LITERAL, 30, 0, 0}, /* OP_LITERAL_30 = 0x1e */ + {KIND_LITERAL, 31, 0, 0}, /* OP_LITERAL_31 = 0x1f */ + {KIND_LITERAL, 32, 0, 0}, /* OP_LITERAL_32 = 0x20 */ + {KIND_LITERAL, 33, 0, 0}, /* OP_LITERAL_33 = 0x21 */ + {KIND_LITERAL, 34, 0, 0}, /* OP_LITERAL_34 = 0x22 */ + {KIND_LITERAL, 35, 0, 0}, /* OP_LITERAL_35 = 0x23 */ + {KIND_LITERAL, 36, 0, 0}, /* OP_LITERAL_36 = 0x24 */ + {KIND_LITERAL, 37, 0, 0}, /* OP_LITERAL_37 = 0x25 */ + {KIND_LITERAL, 38, 0, 0}, /* OP_LITERAL_38 = 0x26 */ + {KIND_LITERAL, 39, 0, 0}, /* OP_LITERAL_39 = 0x27 */ + {KIND_LITERAL, 40, 0, 0}, /* OP_LITERAL_40 = 0x28 */ + {KIND_LITERAL, 41, 0, 0}, /* OP_LITERAL_41 = 0x29 */ + {KIND_LITERAL, 42, 0, 0}, /* OP_LITERAL_42 = 0x2a */ + {KIND_LITERAL, 43, 0, 0}, /* OP_LITERAL_43 = 0x2b */ + {KIND_LITERAL, 44, 0, 0}, /* OP_LITERAL_44 = 0x2c */ + {KIND_LITERAL, 45, 0, 0}, /* OP_LITERAL_45 = 0x2d */ + {KIND_LITERAL, 46, 0, 0}, /* OP_LITERAL_46 = 0x2e */ + {KIND_LITERAL, 47, 0, 0}, /* OP_LITERAL_47 = 0x2f */ + {KIND_LITERAL, 48, 0, 0}, /* OP_LITERAL_48 = 0x30 */ + {KIND_LITERAL, 49, 0, 0}, /* OP_LITERAL_49 = 0x31 */ + {KIND_LITERAL, 50, 0, 0}, /* OP_LITERAL_50 = 0x32 */ + {KIND_LITERAL, 51, 0, 0}, /* OP_LITERAL_51 = 0x33 */ + {KIND_LITERAL, 52, 0, 0}, /* OP_LITERAL_52 = 0x34 */ + {KIND_LITERAL, 53, 0, 0}, /* OP_LITERAL_53 = 0x35 */ + {KIND_LITERAL, 54, 0, 0}, /* OP_LITERAL_54 = 0x36 */ + {KIND_LITERAL, 55, 0, 0}, /* OP_LITERAL_55 = 0x37 */ + {KIND_LITERAL, 56, 0, 0}, /* OP_LITERAL_56 = 0x38 */ + {KIND_LITERAL, 57, 0, 0}, /* OP_LITERAL_57 = 0x39 */ + {KIND_LITERAL, 58, 0, 0}, /* OP_LITERAL_58 = 0x3a */ + {KIND_LITERAL, 59, 0, 0}, /* OP_LITERAL_59 = 0x3b */ + {KIND_LITERAL, 60, 0, 0}, /* OP_LITERAL_60 = 0x3c */ + {KIND_LITERAL, 61, 0, 0}, /* OP_LITERAL_61 = 0x3d */ + {KIND_LITERAL, 62, 0, 0}, /* OP_LITERAL_62 = 0x3e */ + {KIND_LITERAL, 63, 0, 0}, /* OP_LITERAL_63 = 0x3f */ + {KIND_LITERAL, 64, 0, 0}, /* OP_LITERAL_64 = 0x40 */ + {KIND_LITERAL, 0, 1, 0}, /* OP_LITERAL_N1 = 0x41 */ + {KIND_LITERAL, 0, 2, 0}, /* OP_LITERAL_N2 = 0x42 */ + {KIND_LITERAL, 0, 4, 0}, /* OP_LITERAL_N4 = 0x43 */ + {KIND_LITERAL, 0, 8, 0}, /* OP_LITERAL_N8 = 0x44 */ + {KIND_COPY, 0, 1, 1}, /* OP_COPY_N1_N1 = 0x45 */ + {KIND_COPY, 0, 1, 2}, /* OP_COPY_N1_N2 = 0x46 */ + {KIND_COPY, 0, 1, 4}, /* OP_COPY_N1_N4 = 0x47 */ + {KIND_COPY, 0, 1, 8}, /* OP_COPY_N1_N8 = 0x48 */ + {KIND_COPY, 0, 2, 1}, /* OP_COPY_N2_N1 = 0x49 */ + {KIND_COPY, 0, 2, 2}, /* OP_COPY_N2_N2 = 0x4a */ + {KIND_COPY, 0, 2, 4}, /* OP_COPY_N2_N4 = 0x4b */ + {KIND_COPY, 0, 2, 8}, /* OP_COPY_N2_N8 = 0x4c */ + {KIND_COPY, 0, 4, 1}, /* OP_COPY_N4_N1 = 0x4d */ + {KIND_COPY, 0, 4, 2}, /* OP_COPY_N4_N2 = 0x4e */ + {KIND_COPY, 0, 4, 4}, /* OP_COPY_N4_N4 = 0x4f */ + {KIND_COPY, 0, 4, 8}, /* OP_COPY_N4_N8 = 0x50 */ + {KIND_COPY, 0, 8, 1}, /* OP_COPY_N8_N1 = 0x51 */ + {KIND_COPY, 0, 8, 2}, /* OP_COPY_N8_N2 = 0x52 */ + {KIND_COPY, 0, 8, 4}, /* OP_COPY_N8_N4 = 0x53 */ + {KIND_COPY, 0, 8, 8}, /* OP_COPY_N8_N8 = 0x54 */ + {KIND_RESERVED, 85, 0, 0}, /* OP_RESERVED_85 = 0x55 */ + {KIND_RESERVED, 86, 0, 0}, /* OP_RESERVED_86 = 0x56 */ + {KIND_RESERVED, 87, 0, 0}, /* OP_RESERVED_87 = 0x57 */ + {KIND_RESERVED, 88, 0, 0}, /* OP_RESERVED_88 = 0x58 */ + {KIND_RESERVED, 89, 0, 0}, /* OP_RESERVED_89 = 0x59 */ + {KIND_RESERVED, 90, 0, 0}, /* OP_RESERVED_90 = 0x5a */ + {KIND_RESERVED, 91, 0, 0}, /* OP_RESERVED_91 = 0x5b */ + {KIND_RESERVED, 92, 0, 0}, /* OP_RESERVED_92 = 0x5c */ + {KIND_RESERVED, 93, 0, 0}, /* OP_RESERVED_93 = 0x5d */ + {KIND_RESERVED, 94, 0, 0}, /* OP_RESERVED_94 = 0x5e */ + {KIND_RESERVED, 95, 0, 0}, /* OP_RESERVED_95 = 0x5f */ + {KIND_RESERVED, 96, 0, 0}, /* OP_RESERVED_96 = 0x60 */ + {KIND_RESERVED, 97, 0, 0}, /* OP_RESERVED_97 = 0x61 */ + {KIND_RESERVED, 98, 0, 0}, /* OP_RESERVED_98 = 0x62 */ + {KIND_RESERVED, 99, 0, 0}, /* OP_RESERVED_99 = 0x63 */ + {KIND_RESERVED, 100, 0, 0}, /* OP_RESERVED_100 = 0x64 */ + {KIND_RESERVED, 101, 0, 0}, /* OP_RESERVED_101 = 0x65 */ + {KIND_RESERVED, 102, 0, 0}, /* OP_RESERVED_102 = 0x66 */ + {KIND_RESERVED, 103, 0, 0}, /* OP_RESERVED_103 = 0x67 */ + {KIND_RESERVED, 104, 0, 0}, /* OP_RESERVED_104 = 0x68 */ + {KIND_RESERVED, 105, 0, 0}, /* OP_RESERVED_105 = 0x69 */ + {KIND_RESERVED, 106, 0, 0}, /* OP_RESERVED_106 = 0x6a */ + {KIND_RESERVED, 107, 0, 0}, /* OP_RESERVED_107 = 0x6b */ + {KIND_RESERVED, 108, 0, 0}, /* OP_RESERVED_108 = 0x6c */ + {KIND_RESERVED, 109, 0, 0}, /* OP_RESERVED_109 = 0x6d */ + {KIND_RESERVED, 110, 0, 0}, /* OP_RESERVED_110 = 0x6e */ + {KIND_RESERVED, 111, 0, 0}, /* OP_RESERVED_111 = 0x6f */ + {KIND_RESERVED, 112, 0, 0}, /* OP_RESERVED_112 = 0x70 */ + {KIND_RESERVED, 113, 0, 0}, /* OP_RESERVED_113 = 0x71 */ + {KIND_RESERVED, 114, 0, 0}, /* OP_RESERVED_114 = 0x72 */ + {KIND_RESERVED, 115, 0, 0}, /* OP_RESERVED_115 = 0x73 */ + {KIND_RESERVED, 116, 0, 0}, /* OP_RESERVED_116 = 0x74 */ + {KIND_RESERVED, 117, 0, 0}, /* OP_RESERVED_117 = 0x75 */ + {KIND_RESERVED, 118, 0, 0}, /* OP_RESERVED_118 = 0x76 */ + {KIND_RESERVED, 119, 0, 0}, /* OP_RESERVED_119 = 0x77 */ + {KIND_RESERVED, 120, 0, 0}, /* OP_RESERVED_120 = 0x78 */ + {KIND_RESERVED, 121, 0, 0}, /* OP_RESERVED_121 = 0x79 */ + {KIND_RESERVED, 122, 0, 0}, /* OP_RESERVED_122 = 0x7a */ + {KIND_RESERVED, 123, 0, 0}, /* OP_RESERVED_123 = 0x7b */ + {KIND_RESERVED, 124, 0, 0}, /* OP_RESERVED_124 = 0x7c */ + {KIND_RESERVED, 125, 0, 0}, /* OP_RESERVED_125 = 0x7d */ + {KIND_RESERVED, 126, 0, 0}, /* OP_RESERVED_126 = 0x7e */ + {KIND_RESERVED, 127, 0, 0}, /* OP_RESERVED_127 = 0x7f */ + {KIND_RESERVED, 128, 0, 0}, /* OP_RESERVED_128 = 0x80 */ + {KIND_RESERVED, 129, 0, 0}, /* OP_RESERVED_129 = 0x81 */ + {KIND_RESERVED, 130, 0, 0}, /* OP_RESERVED_130 = 0x82 */ + {KIND_RESERVED, 131, 0, 0}, /* OP_RESERVED_131 = 0x83 */ + {KIND_RESERVED, 132, 0, 0}, /* OP_RESERVED_132 = 0x84 */ + {KIND_RESERVED, 133, 0, 0}, /* OP_RESERVED_133 = 0x85 */ + {KIND_RESERVED, 134, 0, 0}, /* OP_RESERVED_134 = 0x86 */ + {KIND_RESERVED, 135, 0, 0}, /* OP_RESERVED_135 = 0x87 */ + {KIND_RESERVED, 136, 0, 0}, /* OP_RESERVED_136 = 0x88 */ + {KIND_RESERVED, 137, 0, 0}, /* OP_RESERVED_137 = 0x89 */ + {KIND_RESERVED, 138, 0, 0}, /* OP_RESERVED_138 = 0x8a */ + {KIND_RESERVED, 139, 0, 0}, /* OP_RESERVED_139 = 0x8b */ + {KIND_RESERVED, 140, 0, 0}, /* OP_RESERVED_140 = 0x8c */ + {KIND_RESERVED, 141, 0, 0}, /* OP_RESERVED_141 = 0x8d */ + {KIND_RESERVED, 142, 0, 0}, /* OP_RESERVED_142 = 0x8e */ + {KIND_RESERVED, 143, 0, 0}, /* OP_RESERVED_143 = 0x8f */ + {KIND_RESERVED, 144, 0, 0}, /* OP_RESERVED_144 = 0x90 */ + {KIND_RESERVED, 145, 0, 0}, /* OP_RESERVED_145 = 0x91 */ + {KIND_RESERVED, 146, 0, 0}, /* OP_RESERVED_146 = 0x92 */ + {KIND_RESERVED, 147, 0, 0}, /* OP_RESERVED_147 = 0x93 */ + {KIND_RESERVED, 148, 0, 0}, /* OP_RESERVED_148 = 0x94 */ + {KIND_RESERVED, 149, 0, 0}, /* OP_RESERVED_149 = 0x95 */ + {KIND_RESERVED, 150, 0, 0}, /* OP_RESERVED_150 = 0x96 */ + {KIND_RESERVED, 151, 0, 0}, /* OP_RESERVED_151 = 0x97 */ + {KIND_RESERVED, 152, 0, 0}, /* OP_RESERVED_152 = 0x98 */ + {KIND_RESERVED, 153, 0, 0}, /* OP_RESERVED_153 = 0x99 */ + {KIND_RESERVED, 154, 0, 0}, /* OP_RESERVED_154 = 0x9a */ + {KIND_RESERVED, 155, 0, 0}, /* OP_RESERVED_155 = 0x9b */ + {KIND_RESERVED, 156, 0, 0}, /* OP_RESERVED_156 = 0x9c */ + {KIND_RESERVED, 157, 0, 0}, /* OP_RESERVED_157 = 0x9d */ + {KIND_RESERVED, 158, 0, 0}, /* OP_RESERVED_158 = 0x9e */ + {KIND_RESERVED, 159, 0, 0}, /* OP_RESERVED_159 = 0x9f */ + {KIND_RESERVED, 160, 0, 0}, /* OP_RESERVED_160 = 0xa0 */ + {KIND_RESERVED, 161, 0, 0}, /* OP_RESERVED_161 = 0xa1 */ + {KIND_RESERVED, 162, 0, 0}, /* OP_RESERVED_162 = 0xa2 */ + {KIND_RESERVED, 163, 0, 0}, /* OP_RESERVED_163 = 0xa3 */ + {KIND_RESERVED, 164, 0, 0}, /* OP_RESERVED_164 = 0xa4 */ + {KIND_RESERVED, 165, 0, 0}, /* OP_RESERVED_165 = 0xa5 */ + {KIND_RESERVED, 166, 0, 0}, /* OP_RESERVED_166 = 0xa6 */ + {KIND_RESERVED, 167, 0, 0}, /* OP_RESERVED_167 = 0xa7 */ + {KIND_RESERVED, 168, 0, 0}, /* OP_RESERVED_168 = 0xa8 */ + {KIND_RESERVED, 169, 0, 0}, /* OP_RESERVED_169 = 0xa9 */ + {KIND_RESERVED, 170, 0, 0}, /* OP_RESERVED_170 = 0xaa */ + {KIND_RESERVED, 171, 0, 0}, /* OP_RESERVED_171 = 0xab */ + {KIND_RESERVED, 172, 0, 0}, /* OP_RESERVED_172 = 0xac */ + {KIND_RESERVED, 173, 0, 0}, /* OP_RESERVED_173 = 0xad */ + {KIND_RESERVED, 174, 0, 0}, /* OP_RESERVED_174 = 0xae */ + {KIND_RESERVED, 175, 0, 0}, /* OP_RESERVED_175 = 0xaf */ + {KIND_RESERVED, 176, 0, 0}, /* OP_RESERVED_176 = 0xb0 */ + {KIND_RESERVED, 177, 0, 0}, /* OP_RESERVED_177 = 0xb1 */ + {KIND_RESERVED, 178, 0, 0}, /* OP_RESERVED_178 = 0xb2 */ + {KIND_RESERVED, 179, 0, 0}, /* OP_RESERVED_179 = 0xb3 */ + {KIND_RESERVED, 180, 0, 0}, /* OP_RESERVED_180 = 0xb4 */ + {KIND_RESERVED, 181, 0, 0}, /* OP_RESERVED_181 = 0xb5 */ + {KIND_RESERVED, 182, 0, 0}, /* OP_RESERVED_182 = 0xb6 */ + {KIND_RESERVED, 183, 0, 0}, /* OP_RESERVED_183 = 0xb7 */ + {KIND_RESERVED, 184, 0, 0}, /* OP_RESERVED_184 = 0xb8 */ + {KIND_RESERVED, 185, 0, 0}, /* OP_RESERVED_185 = 0xb9 */ + {KIND_RESERVED, 186, 0, 0}, /* OP_RESERVED_186 = 0xba */ + {KIND_RESERVED, 187, 0, 0}, /* OP_RESERVED_187 = 0xbb */ + {KIND_RESERVED, 188, 0, 0}, /* OP_RESERVED_188 = 0xbc */ + {KIND_RESERVED, 189, 0, 0}, /* OP_RESERVED_189 = 0xbd */ + {KIND_RESERVED, 190, 0, 0}, /* OP_RESERVED_190 = 0xbe */ + {KIND_RESERVED, 191, 0, 0}, /* OP_RESERVED_191 = 0xbf */ + {KIND_RESERVED, 192, 0, 0}, /* OP_RESERVED_192 = 0xc0 */ + {KIND_RESERVED, 193, 0, 0}, /* OP_RESERVED_193 = 0xc1 */ + {KIND_RESERVED, 194, 0, 0}, /* OP_RESERVED_194 = 0xc2 */ + {KIND_RESERVED, 195, 0, 0}, /* OP_RESERVED_195 = 0xc3 */ + {KIND_RESERVED, 196, 0, 0}, /* OP_RESERVED_196 = 0xc4 */ + {KIND_RESERVED, 197, 0, 0}, /* OP_RESERVED_197 = 0xc5 */ + {KIND_RESERVED, 198, 0, 0}, /* OP_RESERVED_198 = 0xc6 */ + {KIND_RESERVED, 199, 0, 0}, /* OP_RESERVED_199 = 0xc7 */ + {KIND_RESERVED, 200, 0, 0}, /* OP_RESERVED_200 = 0xc8 */ + {KIND_RESERVED, 201, 0, 0}, /* OP_RESERVED_201 = 0xc9 */ + {KIND_RESERVED, 202, 0, 0}, /* OP_RESERVED_202 = 0xca */ + {KIND_RESERVED, 203, 0, 0}, /* OP_RESERVED_203 = 0xcb */ + {KIND_RESERVED, 204, 0, 0}, /* OP_RESERVED_204 = 0xcc */ + {KIND_RESERVED, 205, 0, 0}, /* OP_RESERVED_205 = 0xcd */ + {KIND_RESERVED, 206, 0, 0}, /* OP_RESERVED_206 = 0xce */ + {KIND_RESERVED, 207, 0, 0}, /* OP_RESERVED_207 = 0xcf */ + {KIND_RESERVED, 208, 0, 0}, /* OP_RESERVED_208 = 0xd0 */ + {KIND_RESERVED, 209, 0, 0}, /* OP_RESERVED_209 = 0xd1 */ + {KIND_RESERVED, 210, 0, 0}, /* OP_RESERVED_210 = 0xd2 */ + {KIND_RESERVED, 211, 0, 0}, /* OP_RESERVED_211 = 0xd3 */ + {KIND_RESERVED, 212, 0, 0}, /* OP_RESERVED_212 = 0xd4 */ + {KIND_RESERVED, 213, 0, 0}, /* OP_RESERVED_213 = 0xd5 */ + {KIND_RESERVED, 214, 0, 0}, /* OP_RESERVED_214 = 0xd6 */ + {KIND_RESERVED, 215, 0, 0}, /* OP_RESERVED_215 = 0xd7 */ + {KIND_RESERVED, 216, 0, 0}, /* OP_RESERVED_216 = 0xd8 */ + {KIND_RESERVED, 217, 0, 0}, /* OP_RESERVED_217 = 0xd9 */ + {KIND_RESERVED, 218, 0, 0}, /* OP_RESERVED_218 = 0xda */ + {KIND_RESERVED, 219, 0, 0}, /* OP_RESERVED_219 = 0xdb */ + {KIND_RESERVED, 220, 0, 0}, /* OP_RESERVED_220 = 0xdc */ + {KIND_RESERVED, 221, 0, 0}, /* OP_RESERVED_221 = 0xdd */ + {KIND_RESERVED, 222, 0, 0}, /* OP_RESERVED_222 = 0xde */ + {KIND_RESERVED, 223, 0, 0}, /* OP_RESERVED_223 = 0xdf */ + {KIND_RESERVED, 224, 0, 0}, /* OP_RESERVED_224 = 0xe0 */ + {KIND_RESERVED, 225, 0, 0}, /* OP_RESERVED_225 = 0xe1 */ + {KIND_RESERVED, 226, 0, 0}, /* OP_RESERVED_226 = 0xe2 */ + {KIND_RESERVED, 227, 0, 0}, /* OP_RESERVED_227 = 0xe3 */ + {KIND_RESERVED, 228, 0, 0}, /* OP_RESERVED_228 = 0xe4 */ + {KIND_RESERVED, 229, 0, 0}, /* OP_RESERVED_229 = 0xe5 */ + {KIND_RESERVED, 230, 0, 0}, /* OP_RESERVED_230 = 0xe6 */ + {KIND_RESERVED, 231, 0, 0}, /* OP_RESERVED_231 = 0xe7 */ + {KIND_RESERVED, 232, 0, 0}, /* OP_RESERVED_232 = 0xe8 */ + {KIND_RESERVED, 233, 0, 0}, /* OP_RESERVED_233 = 0xe9 */ + {KIND_RESERVED, 234, 0, 0}, /* OP_RESERVED_234 = 0xea */ + {KIND_RESERVED, 235, 0, 0}, /* OP_RESERVED_235 = 0xeb */ + {KIND_RESERVED, 236, 0, 0}, /* OP_RESERVED_236 = 0xec */ + {KIND_RESERVED, 237, 0, 0}, /* OP_RESERVED_237 = 0xed */ + {KIND_RESERVED, 238, 0, 0}, /* OP_RESERVED_238 = 0xee */ + {KIND_RESERVED, 239, 0, 0}, /* OP_RESERVED_239 = 0xef */ + {KIND_RESERVED, 240, 0, 0}, /* OP_RESERVED_240 = 0xf0 */ + {KIND_RESERVED, 241, 0, 0}, /* OP_RESERVED_241 = 0xf1 */ + {KIND_RESERVED, 242, 0, 0}, /* OP_RESERVED_242 = 0xf2 */ + {KIND_RESERVED, 243, 0, 0}, /* OP_RESERVED_243 = 0xf3 */ + {KIND_RESERVED, 244, 0, 0}, /* OP_RESERVED_244 = 0xf4 */ + {KIND_RESERVED, 245, 0, 0}, /* OP_RESERVED_245 = 0xf5 */ + {KIND_RESERVED, 246, 0, 0}, /* OP_RESERVED_246 = 0xf6 */ + {KIND_RESERVED, 247, 0, 0}, /* OP_RESERVED_247 = 0xf7 */ + {KIND_RESERVED, 248, 0, 0}, /* OP_RESERVED_248 = 0xf8 */ + {KIND_RESERVED, 249, 0, 0}, /* OP_RESERVED_249 = 0xf9 */ + {KIND_RESERVED, 250, 0, 0}, /* OP_RESERVED_250 = 0xfa */ + {KIND_RESERVED, 251, 0, 0}, /* OP_RESERVED_251 = 0xfb */ + {KIND_RESERVED, 252, 0, 0}, /* OP_RESERVED_252 = 0xfc */ + {KIND_RESERVED, 253, 0, 0}, /* OP_RESERVED_253 = 0xfd */ + {KIND_RESERVED, 254, 0, 0}, /* OP_RESERVED_254 = 0xfe */ + {KIND_RESERVED, 255, 0, 0}, /* OP_RESERVED_255 = 0xff */ } diff --git a/vendor/github.com/balena-os/librsync-go/rollsum.go b/vendor/github.com/balena-os/librsync-go/rollsum.go index 83e9f3e0f9..ec2cba6b9a 100644 --- a/vendor/github.com/balena-os/librsync-go/rollsum.go +++ b/vendor/github.com/balena-os/librsync-go/rollsum.go @@ -40,7 +40,7 @@ func (r *Rollsum) Update(p []byte) { } func (r *Rollsum) Rotate(out, in byte) { - r.s1 += uint16(in - out) + r.s1 += uint16(in) - uint16(out) r.s2 += r.s1 - uint16(r.count)*(uint16(out)+uint16(ROLLSUM_CHAR_OFFSET)) } diff --git a/vendor/github.com/balena-os/librsync-go/signature.go b/vendor/github.com/balena-os/librsync-go/signature.go index 2aca3b9f3c..e47ac79025 100644 --- a/vendor/github.com/balena-os/librsync-go/signature.go +++ b/vendor/github.com/balena-os/librsync-go/signature.go @@ -4,6 +4,7 @@ import ( "encoding/binary" "fmt" "io" + "os" "golang.org/x/crypto/blake2b" "golang.org/x/crypto/md4" @@ -73,12 +74,22 @@ func Signature(input io.Reader, output io.Writer, blockLen, strongLen uint32, si ret.blockLen = blockLen for { - n, err := io.ReadFull(input, block) - if err == io.ErrUnexpectedEOF || err == io.EOF { + n, err := io.ReadAtLeast(input, block, int(blockLen)) + if err == io.EOF { + // We reached the end of the input, we are done with the signature break + } else if err == nil || err == io.ErrUnexpectedEOF { + if n == 0 { + // No real error and no new data either: that also signals the + // end the input; we are done with the signature + break + } + // No real error, got data. Leave this `if` and checksum this block } else if err != nil { + // Got a real error, report it back to the caller return nil, err } + data := block[:n] weak := WeakChecksum(data) @@ -96,3 +107,64 @@ func Signature(input io.Reader, output io.Writer, blockLen, strongLen uint32, si return &ret, nil } + +// ReadSignature reads a signature from an io.Reader. +func ReadSignature(r io.Reader) (*SignatureType, error) { + var magic MagicNumber + err := binary.Read(r, binary.BigEndian, &magic) + if err != nil { + return nil, err + } + + var blockLen uint32 + err = binary.Read(r, binary.BigEndian, &blockLen) + if err != nil { + return nil, err + } + + var strongLen uint32 + err = binary.Read(r, binary.BigEndian, &strongLen) + if err != nil { + return nil, err + } + + strongSigs := [][]byte{} + weak2block := map[uint32]int{} + + for { + var weakSum uint32 + err = binary.Read(r, binary.BigEndian, &weakSum) + if err == io.EOF { + break + } else if err != nil { + return nil, err + } + + strongSum := make([]byte, strongLen) + _, err := io.ReadFull(r, strongSum) + if err != nil { + return nil, err + } + + weak2block[weakSum] = len(strongSigs) + strongSigs = append(strongSigs, strongSum) + } + + return &SignatureType{ + sigType: magic, + blockLen: blockLen, + strongLen: strongLen, + strongSigs: strongSigs, + weak2block: weak2block, + }, nil +} + +// ReadSignatureFile reads a signature from the file at path. +func ReadSignatureFile(path string) (*SignatureType, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + return ReadSignature(f) +}