classstuds::Pack
sys::Obj studs::Pack
Pack is a binary encoding for name-value pairs.
See Pack chapter for details.
- decode
static Str:Obj decode(Buf buf)Decode Pack byte buffer into map instance.
- encode
static Buf encode(Str:Obj map)Enode map into a Pack byte buffer.
- read
static Str:Obj read(InStream in)Read a Pack packet from the given
InStreamand return the decoded name/value pair map. Throws IOErr if stream or encoding error occurs.- write
static Void write(OutStream out, Str:Obj map)Write a Pack packet to given
OutStream. ThrowsIOErrif write failed. This method invokesout.flushafter writing packet content.