v2026.11.3
All Bundles
Bundle

File and console I/O primitives. FileReader and FileWriter handle sequential file access; Console provides stdin/stdout operations. Included in lang.obl — no extra -lib flag needed.

Deserializer

Used to deserialize objects

Operations

Holds #

Whether count values of 8 bytes or more could still be read: the bound to apply to a count read from the stream before allocating an array of that size, so a file that claims a billion values does not get them.

method : public : Holds(count:Int) ~ Bool

Parameters

NameTypeDescription
countIntnumber of values

Return

TypeDescription
Booltrue if count is not negative and the bytes left could hold that many

Holds #

Whether rows x cols values of 8 bytes or more could still be read, without multiplying them (the product of two counts from a file can overflow).

method : public : Holds(rows:Int, cols:Int) ~ Bool

Parameters

NameTypeDescription
rowsIntnumber of rows
colsIntnumber of columns

Return

TypeDescription
Booltrue if both are positive and the bytes left could hold that many

IsOk #

Checks that the stream has been readable so far: false if the input was Nil, damaged, truncated or not zlib data, and false from the first read that found the stream too short, an array that declares more than the stream holds, or a value of another type than the read asked for. Check it after the last read, as the reads themselves answer their zero value.

method : public : IsOk() ~ Bool

Return

TypeDescription
Boolfalse once any read has failed

New # constructor

Default constructor. Input that is Nil or not a whole zlib stream, as a damaged or foreign file is, does not end the program: IsOk() is false and every read answers its zero value (0, 0.0, false, Nil).

New(buffer:Byte[])

Parameters

NameTypeDescription
bufferByteinput byte buffer to read from

ReadBool #

Reads a value

method : public : ReadBool() ~ Bool

Return

TypeDescription
Boolvalue read

ReadBoolArray #

Reads an array of values

method : public : ReadBoolArray() ~ Bool[]

Return

TypeDescription
Boolarray of values

ReadByteArray #

Reads an array of values

method : public : ReadByteArray() ~ Byte[]

Return

TypeDescription
Bytearray of values

ReadChar #

Reads a value

method : public : ReadChar() ~ Char

Return

TypeDescription
Charvalue read

ReadCharArray #

Reads an array of values

method : public : ReadCharArray() ~ Char[]

Return

TypeDescription
Chararray of values

ReadFloat #

Reads a value

method : public : ReadFloat() ~ Float

Return

TypeDescription
Floatvalue read

ReadFloatArray #

Reads an array of values

method : public : ReadFloatArray() ~ Float[]

Return

TypeDescription
Floatarray of values

ReadInt #

Reads a value

method : public : ReadInt() ~ Int

Return

TypeDescription
Intvalue read

ReadIntArray #

Reads an array of values

method : public : ReadIntArray() ~ Int[]

Return

TypeDescription
Intarray of values

ReadObject #

Reads an object

method : public : ReadObject() ~ Base

Return

TypeDescription
Basevalue read

ReadObjectArray #

Reads an object array

method : public : ReadObjectArray() ~ Base[]

Return

TypeDescription
Basevalue read

Remaining #

Counts the bytes not yet read. A reader that follows a structure of unknown depth, such as a tree, stops at 0 instead of reading zeros for ever.

method : public : Remaining() ~ Int

Return

TypeDescription
Intbytes left in the stream