Documentation
¶
Overview ¶
Package pack is the message packing scheme for venti, and some convenience functions for reading/writing venti packets.
See venti(7) from Plan 9 or plan9port.
Index ¶
- func String(b []byte, s string) int
- func Uint16(b []byte, v uint16) int
- func Uint32(b []byte, v uint32) int
- func Uint64(b []byte, v uint64) int
- func UnString(b []byte) (int, string)
- func UnUint16(b []byte) (int, uint16)
- func UnUint32(b []byte) (int, uint32)
- func UnUint64(b []byte) (int, uint64)
- func UnVar(b []byte) (int, []byte)
- func Var(b []byte, v []byte) int
- type Chunker
- type Dechunker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnString ¶
UnString unpacks a string from the []byte, returning the number of bytes used and the string.
func UnUint16 ¶
UnUint16 unpacks a string from the []byte, returning the number of bytes used and the uint16.
func UnUint32 ¶
UnUint32 unpacks a string from the []byte, returning the number of bytes used and the uint32.
func UnUint64 ¶
UnUint64 unpacks a string from the []byte, returning the number of bytes used and the uint64.
Types ¶
type Chunker ¶
type Chunker struct { Chatty bool // contains filtered or unexported fields }
Chunker yeilds writers that emit venti-format packets.
We only emit venti v04 compatable packets.
func (*Chunker) New ¶
func (w *Chunker) New() io.WriteCloser
New returns a io.WriteCloser that buffers writes and frames and flushes data when closed.