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