Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions rlp/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ func (r *RawList[T]) Append(item T) error {
return nil
}

// AppendRaw adds an encoded item to the list.
func (r *RawList[T]) AppendRaw(b []byte) {
if r.enc == nil {
r.enc = make([]byte, 9)
}
r.enc = append(r.enc, b...)
}

// StringSize returns the encoded size of a string.
func StringSize(s string) uint64 {
switch n := len(s); n {
Expand Down