v2026.6.4
All Bundles
Bundle Core runtime library providing primitive types (Bool, Byte, Char, Int, Float, String), base collections, and system utilities. Every Objeck program links against this bundle automatically via lang.obl.

Byte

The byte class represents a 1-byte value.

Inherits: Number

Operations

Abs # function

Returns the absolute value

function : Abs() ~ Byte

Return

TypeDescription
Byteabsolute value

CRC32 # function

Calculates the signed CRC32 value for the stream

function : CRC32() ~ Int

Return

TypeDescription
Intsigned CRC32

Clamp # function

Returns a given value between an upper and lower bound

function : Clamp(min:Byte, value:Byte, max:Byte) ~ Byte

Parameters

NameTypeDescription
minByteminimal value
valueBytevalue between the min and max
maxBytemaximum value

Return

TypeDescription
Bytemin if vaule is less than main, max if max is less than value, otherwise the value

Clear # function

Set all array elements to zero

function : Clear(b:Byte[]) ~ Nil

Parameters

NameTypeDescription
bBytebyte array

Compare # native

Compares two values

function : native : Compare(l:Byte, r:Byte) ~ Int

Parameters

NameTypeDescription
lByteleft compare object
rByteright compare object

Return

TypeDescription
Int0 if equal, -1 if types differ, 1 if equal

CompressBr # function

Compresses a byte stream using Brotli

function : CompressBr() ~ Byte[]

Return

TypeDescription
Bytecompressed bytes

CompressGzip # function

Compresses a byte stream using gzip

function : CompressGzip() ~ Byte[]

Return

TypeDescription
Bytecompressed bytes

CompressZlib # function

Compresses a byte stream using zlib

function : CompressZlib() ~ Byte[]

Return

TypeDescription
Bytecompressed bytes

Error # function

Prints error value

function : Error() ~ Nil

ErrorLine # function

Prints error value with newline

function : ErrorLine() ~ Nil

Find # native

Searches for the first occurrence of a byte

function : native : Find(bytes:Byte[], search:Byte) ~ Int

Parameters

NameTypeDescription
bytesBytebyte array to search
searchBytebyte to search for

Return

TypeDescription
Inttrue of found, false otherwise

Find # native

Searches for the first occurrence of a byte

function : native : Find(bytes:Byte[], offset:Int, search:Byte) ~ Int

Parameters

NameTypeDescription
bytesBytebyte array to search
offsetIntsearch offset
searchBytebyte to search for

Return

TypeDescription
Inttrue of found, false otherwise

Find # native

Searches for the first occurrence of a byte array

function : native : Find(bytes:Byte[], search:Byte[]) ~ Int

Parameters

NameTypeDescription
bytesBytebyte array to search
searchBytebyte array to search for

Return

TypeDescription
Intindex of first occurrence, -1 otherwise

Find # native

Searches for the first occurrence of a byte array

function : native : Find(bytes:Byte[], offset:Int, search:Byte[]) ~ Int

Parameters

NameTypeDescription
bytesBytebyte array to search
offsetIntsearch offset
searchBytebyte array to search for

Return

TypeDescription
Intindex of first occurrence, -1 otherwise

FindAll # function

Searches for all occurrences of the byte array

function : FindAll(bytes:Byte[], search:Byte[]) ~ Int[]

Parameters

NameTypeDescription
bytesBytebyte array to search
searchBytebyte array to search for

Return

TypeDescription
Intan array of indexes

IsNeg # function

Checks is a number is negative

function : IsNeg() ~ Bool

Return

TypeDescription
Booltrue if negative, false otherwise

Max # function

Returns the largest byte value

function : Max(l:Byte, r:Byte) ~ Byte

Parameters

NameTypeDescription
lBytevalue to compare
rBytevalue to compare

Return

TypeDescription
Bytelargest byte value

Min # function

Returns the smallest byte value

function : Min(l:Byte, r:Byte) ~ Byte

Parameters

NameTypeDescription
lBytevalue to compare
rBytevalue to compare

Return

TypeDescription
Bytesmallest byte value

Print # function

Prints value

function : Print() ~ Nil

PrintLine # function

Prints value with newline

function : PrintLine() ~ Nil

PrintLine # native

Prints values

function : native : PrintLine(v:Byte[]) ~ Nil

Parameters

NameTypeDescription
vBytevalues to print

PrintLine # native

Prints values

function : native : PrintLine(v:Byte[,]) ~ Nil

Parameters

NameTypeDescription
vBytevalues to print

ToBinaryString # native

Returns a binary string representation of the value

function : native : ToBinaryString() ~ String

Return

TypeDescription
Stringbinary string representation of the value

ToChar # function

Returns the Character value

function : ToChar() ~ Char

Return

TypeDescription
Charvalue

ToFloat # function

Returns the Float value

function : ToFloat() ~ Float

Return

TypeDescription
Floatvalue

ToHexString # native

Returns a positive hexadecimal string representation of the value

function : native : ToHexString() ~ String

Return

TypeDescription
Stringhexadecimal string representation of the value

ToInt # function

Returns the Int value

function : ToInt() ~ Int

Return

TypeDescription
Intvalue

ToString # native

Returns a string representation of the value

function : native : ToString() ~ String

Return

TypeDescription
Stringstring representation of the value

ToString # native

Returns a string representation of the byte array

function : native : ToString(v:Byte[]) ~ String

Parameters

NameTypeDescription
vBytebyte array

Return

TypeDescription
Stringstring representation of the byte array

ToString # function

Returns a string representation of the byte array

function : ToString(v:Byte[,]) ~ String

Parameters

NameTypeDescription
vBytebyte array

Return

TypeDescription
Stringstring representation of the byte array

ToUnicode # function

Converts the byte array to a character array

function : ToUnicode(b:Byte[]) ~ Char[]

Parameters

NameTypeDescription
bBytearray

Return

TypeDescription
Charcharacter array

UncompressBr # function

Uncompresses a byte stream using Brotli

function : UncompressBr() ~ Byte[]

Return

TypeDescription
Byteuncompressed bytes

UncompressGzip # function

Uncompresses a byte stream using gzip

function : UncompressGzip() ~ Byte[]

Return

TypeDescription
Byteuncompressed bytes

UncompressZlib # function

Uncompresses a byte stream using zlib

function : UncompressZlib() ~ Byte[]

Return

TypeDescription
Byteuncompressed bytes