InternalBuffer

Internal buffer and related operations for Unpacker

Following Unpackers mixin this template. So, Unpacker can use following methods.

//buffer image:
+-------------------------------------------+
| [object] | [obj | unparsed... | unused... |
+-------------------------------------------+
           ^ offset
                  ^ current
                                ^ used
                                            ^ buffer.length

This mixin template is a private.

Members

Functions

bufferConsumed
void bufferConsumed(size_t size)

Consumes buffer. This method is helper for buffer property. You must use this method if you write bytes to buffer directly.

feed
void feed(ubyte[] target)

Fills internal buffer with target.

removeUnparsed
void removeUnparsed()

Removes unparsed buffer.

Properties

buffer
ubyte[] buffer [@property getter]

Forwards to internal buffer.

parsedSize
size_t parsedSize [@property getter]
size
size_t size [@property getter]
unparsedSize
size_t unparsedSize [@property getter]

Meta