message-size-increase #3

Open
sashakoshka wants to merge 132 commits from message-size-increase into main
Showing only changes of commit 32df336c3e - Show all commits

View File

@ -69,6 +69,19 @@ func DecodeVILA(data []byte) ArrayPullFunc {
}
}
// DecodeVILAIter decodes a variable item length array and returns it as an
// iterator.
func DecodeVILAIter(data []byte) iter.Seq[[]byte] {
return func(yield func([]byte) bool) {
pull := DecodeVILA(data)
for {
value, _, err := pull()
if err != nil { return }
if !yield(value) { return }
}
}
}
// EncodeVILA encodes a variable item length array.
func EncodeVILA(data []byte, items ...[]byte) ArrayPushFunc {
n := 0