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 InStream and 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. Throws IOErr if write failed. This method invokes out.flush after writing packet content.