Documentation
¶
Overview ¶
Package byte allows efficiently manipulating fragmented slices
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rope ¶
type Rope[T any] [][]T
Rope data structure for byte slices
func (Rope[T]) Copy ¶
Copy copies bytes from the src slices to r returning the number of bytes copied
Example ¶
package main
import (
"github.com/MemeLabs/strims/pkg/rope"
)
func main() {
src := rope.New([]byte("first chunk"), []byte("second chunk"))
dst := rope.New(make([]byte, src.Len()/2))
dst.Copy(src...)
}
Output:
Click to show internal directories.
Click to hide internal directories.