class PickleBuffer

Variable length byte arrays, with methods for basic pickling and unpickling.

Constructors

PickleBuffer ( data: Array [ Byte ] , from: Int , to: Int )

Members

var bytes : Array [ Byte ]
private val data : Array [ Byte ]
private val from : Int
var readIndex : Int
private val to : Int
var writeIndex : Int
def bytes_= ( x$1: Array [ Byte ] ) : Unit
[+] def createIndex : Array [ Int ]

Pickle = majorVersion_Nat minorVersion_Nat nbEntries_Nat {Entry} Entry = type_Nat length_Nat [actual entries]

Assumes that the ..Version_Nat are already...

Pickle = majorVersion_Nat minorVersion_Nat nbEntries_Nat {Entry} Entry = type_Nat length_Nat [actual entries]

Assumes that the ..Version_Nat are already consumed.

private def dble ( ) : Unit

Double bytes array

Double bytes array

def ensureCapacity ( capacity: Int ) : Unit
def patchNat ( pos: Int , x: Int ) : Unit

Write a natural number x at position pos. If number is more than one byte, shift rest of array to make space.

Write a natural number x at position pos. If number is more than one byte, shift rest of array to make space.

def peekByte ( ) : Int

Peek at the current byte without moving the read index

Peek at the current byte without moving the read index

def readByte ( ) : Int

Read a byte

Read a byte

def readIndex_= ( x$1: Int ) : Unit
def readLong ( len: Int ) : Long

Read a long number in signed big endian format, base 256.

Read a long number in signed big endian format, base 256.

def readLongNat ( ) : Long
def readNat ( ) : Int

Read a natural number in big endian format, base 128. All but the last digits have bit 0x80 set.

Read a natural number in big endian format, base 128. All but the last digits have bit 0x80 set.

def times ( n: Int , op: () => T ) : List [ T ]

Perform operation op the number of times specified. Concatenate the results into a list.

Perform operation op the number of times specified. Concatenate the results into a list.

def toIndexedSeq : IndexedSeq [ ( Int, Array [ Byte ] ) ]
def until ( end: Int , op: () => T ) : List [ T ]

Perform operation op until the condition readIndex == end is satisfied. Concatenate results into a list.

Perform operation op until the condition readIndex == end is satisfied. Concatenate results into a list.

def writeByte ( b: Int ) : Unit

Write a byte of data

Write a byte of data

def writeIndex_= ( x$1: Int ) : Unit
def writeLong ( x: Long ) : Unit

Write a long number x in signed big endian format, base 256.

Write a long number x in signed big endian format, base 256.

[+] def writeLongNat ( x: Long ) : Unit

Like writeNat, but for longs. This is not the same as writeLong, which writes in base 256. Note that the binary representation of LongNat is identical t...

Like writeNat, but for longs. This is not the same as writeLong, which writes in base 256. Note that the binary representation of LongNat is identical to Nat if the long value is in the range Int.MIN_VALUE to Int.MAX_VALUE.

def writeNat ( x: Int ) : Unit

Write a natural number in big endian format, base 128. All but the last digits have bit 0x80 set.

Write a natural number in big endian format, base 128. All but the last digits have bit 0x80 set.