message-size-increase #3

Merged
sashakoshka merged 227 commits from message-size-increase into main 2025-09-07 19:27:38 -06:00
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