Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateCRLF = State(C.RYDEC_STATE_CRLF) StateEQ = State(C.RYDEC_STATE_EQ) StateCR = State(C.RYDEC_STATE_CR) StateNone = State(C.RYDEC_STATE_NONE) StateCRLFDT = State(C.RYDEC_STATE_CRLFDT) StateCRLFDTCR = State(C.RYDEC_STATE_CRLFDTCR) StateCRLFEQ = State(C.RYDEC_STATE_CRLFEQ) // may actually be "\r\n.=" in raw Decoder )
View Source
const ( EndNone = End(C.RYDEC_END_NONE) // end not reached EndControl = End(C.RYDEC_END_CONTROL) // \r\n=y sequence found, src points to byte after 'y' EndArticle = End(C.RYDEC_END_ARTICLE) // \r\n.\r\n sequence found, src points to byte after last '\n' )
Variables ¶
Functions ¶
func ReleaseDecoder ¶
func ReleaseDecoder(dec *Decoder)
ReleaseDecoder returns dec acquired via AcquireDecoder to Decoder pool.
It is forbidden accessing dec and/or its members after returning it to Decoder pool.
Types ¶
type Decoder ¶
type Decoder struct { State State // contains filtered or unexported fields }
func AcquireDecoder ¶
func AcquireDecoder() *Decoder
AcquireDecoder returns an empty Decoder instance from Decoder pool.
The returned Decoder instance may be passed to ReleaseDecoder when it is no longer needed. This allows Decoder recycling, reduces GC pressure and usually improves performance.
func NewDecoder ¶
type End ¶
type End int
End is the State for incremental decoding, whether the end of the yEnc data was reached
type Meta ¶
type Meta struct { Size int64 // Total size of the file Begin int64 // Part begin offset (0-indexed) End int64 // Part end offset (0-indexed, exclusive) Hash uint32 // CRC32 hash of the decoded data Name string // Name of the file }
Meta is the result of parsing the yEnc headers (ybegin, ypart, yend)
Click to show internal directories.
Click to hide internal directories.