mirror of
https://github.com/soypat/lneto.git
synced 2026-08-22 23:49:08 +00:00
add raw buffer access
This commit is contained in:
@@ -196,6 +196,10 @@ func (h *Header) BufferParsed() int {
|
||||
return h.hbuf.off
|
||||
}
|
||||
|
||||
// BufferRaw returns the undeerlying buffer as stored currently in memory.
|
||||
// The length of the returned buffer is the used portion. Capacity of returned slice is [Header.BufferCapacity].
|
||||
func (h *Header) BufferRaw() []byte { return h.hbuf.buf }
|
||||
|
||||
// BufferUsed returns the raw memory used.
|
||||
//
|
||||
// BufferUsed + BufferFree == BufferCapacity
|
||||
|
||||
Reference in New Issue
Block a user