Documentation ¶
Index ¶
- Constants
- type ByteMap
- func (m *ByteMap) Bytes() []byte
- func (m *ByteMap) Fill(offset int, content []byte)
- func (m *ByteMap) FillLeftWithNoise(noise func() byte)
- func (m *ByteMap) FindFree(Len int) int
- func (m *ByteMap) FindFreeAfter(Len int, offset int) int
- func (m *ByteMap) FindFreeRange(Len, begin, end int) []int
- func (m *ByteMap) Last() (int, int)
- func (m *ByteMap) Resize(size int)
- func (m *ByteMap) Size() int
- func (m *ByteMap) Test(offset int) bool
- func (m *ByteMap) Trim(trimleft bool, trimright bool, targetLen int)
Constants ¶
View Source
const MAXLEN = 1 << 20
MAXLEN 1MB
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteMap ¶
type ByteMap struct {
// contains filtered or unexported fields
}
func NewByteMap ¶
func (*ByteMap) Fill ¶
Fill without check if filled if content is too large ByteMap will be resized to fit in
func (*ByteMap) FillLeftWithNoise ¶
FillLeftWithNoise fill the left empty space with noise
func (*ByteMap) FindFreeAfter ¶
FindFreeAfter find the first free space with Len after offset
func (*ByteMap) FindFreeRange ¶
FindFreeRange find all free spaces with Len in range [begin,end)
Click to show internal directories.
Click to hide internal directories.