scalus.flat

package scalus.flat

Members list

Type members

Classlikes

class ArrayByteFlat extends Flat[Array[Byte]]

Prealigned Arrays of bytes PreAligned a ≡ PreAligned {preFiller :: Filler, preValue :: a}

Prealigned Arrays of bytes PreAligned a ≡ PreAligned {preFiller :: Filler, preValue :: a}

Filler ≡ FillerBit Filler | FillerEnd

Array v = A0 | A1 v (Array v) | A2 v v (Array v) ... | A255 ... (Array v)

Attributes

Supertypes
trait Flat[Array[Byte]]
class Object
trait Matchable
class Any
class DecoderState(val buffer: Uint8Array)

Attributes

Supertypes
class Object
trait Matchable
class Any
class EncoderState(bufferSize: Int)

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Flat[A]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class Natural(n: BigInt)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object given_Flat_BigInt extends Flat[BigInt]

Attributes

Supertypes
trait Flat[BigInt]
class Object
trait Matchable
class Any
Self type
object given_Flat_Boolean extends Flat[Boolean]

Attributes

Supertypes
trait Flat[Boolean]
class Object
trait Matchable
class Any
Self type
object given_Flat_Int extends Flat[Int]

Attributes

Supertypes
trait Flat[Int]
class Object
trait Matchable
class Any
Self type
object given_Flat_Long extends Flat[Long]

Attributes

Supertypes
trait Flat[Long]
class Object
trait Matchable
class Any
Self type
object given_Flat_Natural extends Flat[Natural]

Attributes

Supertypes
trait Flat[Natural]
class Object
trait Matchable
class Any
Self type
object given_Flat_String extends Flat[String]

Attributes

Supertypes
trait Flat[String]
class Object
trait Matchable
class Any
Self type
object given_Flat_Unit extends Flat[Unit]

Attributes

Supertypes
trait Flat[Unit]
class Object
trait Matchable
class Any
Self type

Types

type Uint8Array = Array[Byte]

Value members

Concrete methods

def byteAsBitString(b: Byte): String
def decode[A : Flat](dec: DecoderState): A
def encode[A : Flat](a: A, enc: EncoderState): Unit
def w7l(n: Long): List[Byte]
def w7l(n: BigInt): List[Byte]
def zagZig(u: Int): Int
def zagZig(u: Long): Long
def zagZig(u: BigInt): BigInt
def zigZag(x: Int): Int

ZigZag encoding https://gist.github.com/mfuerstenau/ba870a29e16536fdbaba Maps negative values to positive values while going back and forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...)

ZigZag encoding https://gist.github.com/mfuerstenau/ba870a29e16536fdbaba Maps negative values to positive values while going back and forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...)

Attributes

def zigZag(x: Long): Long
def zigZag(x: BigInt): BigInt