Packages

trait VLQWriter extends Writer

Linear Supertypes
Writer, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. VLQWriter
  2. Writer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type CH

    Type of encoded data

    Type of encoded data

    Definition Classes
    Writer

Abstract Value Members

  1. abstract def length(): Int

    Length of encoded data

    Length of encoded data

    Definition Classes
    Writer
  2. abstract def newWriter(): Aux[CH]

    Creates new instance of this Writer

    Creates new instance of this Writer

    returns

    new instance of Writer

    Definition Classes
    Writer
  3. abstract def put(x: Byte): VLQWriter.this.type

    Encode signed byte

    Encode signed byte

    x

    byte value to encode

    Definition Classes
    Writer
  4. abstract def putBoolean(x: Boolean): VLQWriter.this.type

    Encode boolean

    Encode boolean

    x

    boolean value to encode

    Definition Classes
    Writer
  5. abstract def putBytes(xs: Array[Byte], offset: Int, length: Int): VLQWriter.this.type

    Encode a slice of array of bytes.

    Encode a slice of array of bytes.

    xs

    an array to take bytes from

    offset

    first byte of the slice

    length

    of the slice (number of bytes)

    Definition Classes
    Writer
  6. abstract def putBytes(xs: Array[Byte]): VLQWriter.this.type

    Encode an array of bytes

    Encode an array of bytes

    xs

    value to encode

    Definition Classes
    Writer
  7. abstract def putChunk(chunk: CH): VLQWriter.this.type

    Encode chunk

    Encode chunk

    chunk

    to put into this Writer

    Definition Classes
    Writer
  8. abstract def result(): CH

    Returns encoded result

    Returns encoded result

    returns

    encoded result

    Definition Classes
    Writer
  9. abstract def toBytes: Array[Byte]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def append(writer: Aux[CH]): VLQWriter.this.type

    Append result of $writer to this Writer

    Append result of $writer to this Writer

    writer

    is used as source of bytes

    Definition Classes
    Writer
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def putBits(xs: Array[Boolean]): VLQWriter.this.type

    Encode an array of boolean values as a bit array

    Encode an array of boolean values as a bit array

    xs

    array of boolean values

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
  16. def putInt(x: Int): VLQWriter.this.type

    Encode signed Int using VLQ with ZigZag.

    Encode signed Int using VLQ with ZigZag. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putUInt. Use putUInt to encode values that are positive.

    x

    signed Int

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
    Note

    Have to be decoded only with VLQReader.getInt The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.

    See also

    https://en.wikipedia.org/wiki/Variable-length_quantity

  17. def putLong(x: Long): VLQWriter.this.type

    Encode signed Long using VLQ with ZigZag.

    Encode signed Long using VLQ with ZigZag. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putULong. Use putULong to encode values that are positive.

    x

    prefer signed Long

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
    Note

    Have to be decoded only with VLQReader.getLong The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.

    See also

    https://en.wikipedia.org/wiki/Variable-length_quantity

  18. def putOption[T](x: Option[T])(putValue: (VLQWriter.this.type, T) ⇒ Unit): VLQWriter.this.type

    Encode optional value

    Encode optional value

    x

    optional value to encode

    putValue

    procedure to encode value, if $x is nonempty

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
  19. def putShort(x: Short): VLQWriter.this.type

    Encode signed Short using ZigZag and then VLQ.

    Encode signed Short using ZigZag and then VLQ. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putUShort. Use putUShort to encode values that are always positive.

    x

    signed Short

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
    Note

    Have to be decoded only with VLQReader.getShort The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.

    See also

    https://en.wikipedia.org/wiki/Variable-length_quantity

  20. def putShortString(s: String): VLQWriter.this.type

    Encode String is shorter than 256 bytes

    Encode String is shorter than 256 bytes

    s

    String

    Definition Classes
    VLQWriterWriter
  21. def putUByte(x: Int): VLQWriter.this.type

    Encode integer as an unsigned byte asserting the range check

    Encode integer as an unsigned byte asserting the range check

    x

    integer value to encode

    Definition Classes
    Writer
    Exceptions thrown

    AssertionError if x is outside of the unsigned byte range

  22. def putUInt(x: Long): VLQWriter.this.type

    Encode unsigned Int value using VLQ.

    Encode unsigned Int value using VLQ. Only positive values are supported. Use putInt to encode negative and positive values.

    x

    unsigned Int

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
    Exceptions thrown

    AssertionError for values not in unsigned Int range

    See also

    https://en.wikipedia.org/wiki/Variable-length_quantity

  23. def putULong(x: Long): VLQWriter.this.type

    Encode signed Long value using VLQ.

    Encode signed Long value using VLQ. Both negative and positive values are supported, but only positive values are encoded efficiently, negative values are taking a toll and use six bytes. Use putLong to encode negative and positive values.

    x

    prefer unsigned Long (signed value will produce a significant overhead, see note above)

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
    Note

    Don't use it for negative values, the resulting varint is always ten bytes long – it is, effectively, treated like a very large unsigned integer. If you use putLong, the resulting varint uses ZigZag encoding, which is much more efficient.

    See also

    https://en.wikipedia.org/wiki/Variable-length_quantity

  24. def putUShort(x: Int): VLQWriter.this.type

    Encode unsigned Short value using VLQ.

    Encode unsigned Short value using VLQ. Only positive values are supported, Use putShort to encode negative and positive values.

    x

    unsigned Short in a range 0 <= x <= 0xFFFF represented as Int

    Definition Classes
    VLQWriterWriter
    Annotations
    @inline()
    Exceptions thrown

    AssertionError for values not in unsigned Short range

    See also

    https://en.wikipedia.org/wiki/Variable-length_quantity

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Writer

Inherited from AnyRef

Inherited from Any

Ungrouped