Packages

object codec

Source
codec.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. codec
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class ByteVectorCodecSyntax extends AnyVal
  2. implicit final class UnitCodecSyntax extends AnyVal

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. val SPACE: Codec[Unit]

    codec that encodes/decodes to space *

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val asciiToken: Codec[String]
  7. def bitsOfString(s: String, chs: Charset = StandardCharsets.UTF_8): BitVector

    converts string to bits, given supplied encoding *

  8. lazy val bitsWsRemoved: Codec[BitVector]
  9. lazy val boolAsString: Codec[Boolean]
  10. def bytesUntil(f: (Byte) ⇒ Boolean): Codec[ByteVector]

    Decodes bytes util f holds.

    Decodes bytes util f holds. Encodes as identity

  11. lazy val bytesWsRemoved: Codec[ByteVector]
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def constantString1(s: String): Codec[Unit]

    codec that encodes and deoces to supplied string *

  14. def constantString1CaseInsensitive(s: String): Codec[Unit]

    like constantString1 but decodes when matches case insensitive.

    like constantString1 but decodes when matches case insensitive. Works fro ascii only. *

  15. def dropWhile(encodeAs: BitVector)(f: (Byte) ⇒ Boolean): Codec[Unit]

    drops while f holds.

    drops while f holds. Then when encoding uses encodeAs *

  16. def duration[N](units: TimeUnit, mkN: (Double) ⇒ N)(codec: Codec[N])(implicit N: Numeric[N]): Codec[FiniteDuration]

    creates duration from specified units *

  17. def durationIntMs(codec: Codec[Int]): Codec[FiniteDuration]

    encodes duration in Ms for Int *

  18. def enclosedBy[A](open: Char, close: Char)(codec: Codec[A]): Codec[A]

    When decoding takes up bytes if open and close character are found.

    When decoding takes up bytes if open and close character are found. if there are multiple open characters found, this decodes until matching close characters are found. When encoding wraps the result of codec to open and close characters

  19. val epochTimestamp: Codec[Date]

    encodes as ms since epoch *

  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  22. val eventuallyQuotedAsciiString: Codec[String]
  23. def eventuallyQuotedString(quotableChars: Set[Char], quote: Char = '"', escape: Char = '\\', charset: Charset = StandardCharsets.UTF_8): Codec[String]

    Decodes string from eventually quoted string.

    Decodes string from eventually quoted string. If the decoded string was not quoted and contains chars within quotableChars the encoding will fail

    quotableChars

    Chars that must be quoted

    quote

    A quoting char

    escape

    An escape char used to escape quote and eventually other chars.

    charset

    Charset

  24. val eventuallyQuotedUTF8String: Codec[String]
  25. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. lazy val floatAsString: Codec[Float]

    Float encoded as string value

  27. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  28. def guard[A](c: Codec[A])(f: (A) ⇒ Option[Err]): Codec[A]

    Applies predicate f to check whether A was decoded successfully, or may be encoded.

    Applies predicate f to check whether A was decoded successfully, or may be encoded. If f yields to String, then this signals failure

  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  30. def ignoreBytes(f: (Byte) ⇒ Boolean): Codec[Unit]

    a codec that will ignore when decoding all bytes until f holds, On encoding will encode to empty *

  31. val ignoreWS: Codec[Unit]

    codec that ignores any Whitespace when decoding *

  32. lazy val intAsString: Codec[Int]

    Int encoded as string value

  33. def intBounded(codec: Codec[Int])(min: Int, max: Int): Codec[Int]

    int codec, that allows min/max bounds inclusive *

  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. lazy val longAsString: Codec[Long]

    Int encoded as string value

  36. def lookahead2(codec: Codec[Unit]): Codec[Boolean]

    correct version of lookahead that won't encode codec when encoding *

  37. def maxItems[A](sz: Int)(codec: Codec[Vector[A]]): Codec[Vector[A]]

    will encode vectors of A with at max size of sz *

  38. def minItems[A](sz: Int)(codec: Codec[Vector[A]]): Codec[Vector[A]]

    will encode vectors of A with min size of at least sz *

  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  42. val quotedAsciiString: Codec[String]

    codec for ascii strings that may be quoted *

  43. val quotedAsciiToken: Codec[String]
  44. def quotedString(charset: Charset, quote: Char = '"', escape: Char = '\\'): Codec[String]

    A generic codec to encode quoted string.

    A generic codec to encode quoted string.

    Quoted string starts with Ascii quote char and continues with any character, compatible with charset. Characters may be escaped by escape and correct character. Any quote char must be escaped.

    charset

    Charset of the string. Must be ASCII backward compatible, not using first 7 bits of each byte for the characters except the ascii ones.

    quote

    Quote enclosing the string. Must be ascii character

    escape

    Escape char, must be ascii.

  45. val quotedUTF8String: Codec[String]
  46. def recover2(codec: Codec[Unit]): Codec[Boolean]

     like Recover codec, but with fixed encode *

  47. def stringBounded(codec: Codec[String])(min: Int, max: Int): Codec[String]

    string codec, that allows min/max bounds on size inclusive *

  48. def stringEnumerated(discriminator: Codec[String], enumeration: Enumeration): DiscriminatorCodec[Value, String]
  49. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  50. def tagged[A, T](codec: Codec[A]): Codec[@@[A, T]]

    tags value A with T *

  51. def takeWhile[A](codec: Codec[A])(f: (Byte) ⇒ Boolean): Codec[A]

    takes bytes until f holds, then decodes via codec *

  52. def takeWhile[A](discriminator: ByteVector, encodingDiscriminator: ByteVector, codec: Codec[A], maxLength: Int = Int.MaxValue): Codec[A]

    A codec that takes all bytes until discriminator is found.

    A codec that takes all bytes until discriminator is found. Then codec is applied to get A Remainder AFTER discriminator is returned

  53. def takeWhileChar[A](codec: Codec[A])(char: Char, chars: Char*): Codec[A]

    takes bytes until char or chars are encountered *

  54. def terminated[A](codec: Codec[A], terminator: Terminator[Unit]): Codec[A]

    A codec, that on decoding will first decode via terminator and when that will be successful, will take all bits returned by terminator and passes them to be decoded by codec.

    A codec, that on decoding will first decode via terminator and when that will be successful, will take all bits returned by terminator and passes them to be decoded by codec.

    On encoding, this will encode A followed by terminator.

    codec

    Codec that encodes/decodes A

    terminator

    Terminator that returns sequence of data for codec

  55. def terminatedBy[A](delimiter: ByteVector, encDelimiter: ByteVector, codec: Codec[A]): Codec[A]

    Decodes bytes that are terminated by supplied byte, and then applies codec on bytes decoded differs from codec ~ delimiter so the delimiter is scanned first and then codec is applied.

    Decodes bytes that are terminated by supplied byte, and then applies codec on bytes decoded differs from codec ~ delimiter so the delimiter is scanned first and then codec is applied.

    The delimiter is not part of any remainder returned when decoding.

    instead using delimiter to encode, encDelimiter is used.

  56. def toString(): String
    Definition Classes
    AnyRef → Any
  57. def token(codec: Codec[String], terminator: Char = ' '): Codec[String]

    Decodes to token(string) eventually terminated by terminator.

    Decodes to token(string) eventually terminated by terminator. Terminator is not customed by this codec.. encodes to codec. Terminator must be Ascii Char

    codec

    codec to terminate the value

    terminator

    tzerminator

  58. def untilEOL[A](codec: Codec[A], encodeNewLine: BitVector = BitVector.view("\r\n".getBytes)): Codec[A]

    codec that decodes codec, until EOL signature is found.

    codec that decodes codec, until EOL signature is found. EOL is defined as crlf or lf only*

  59. def untilWs[A](codec: Codec[A]): Codec[A]

    codec that takes until any whitespace and then this applies supplied codec *

  60. val utf8Token: Codec[String]
  61. def vectorV[A](codec: Codec[A]): Codec[Vector[A]]

    like vector[A], but instead consuming all bytes on decoding will try to consume all bytes that match for A and will leave last bytes that did not match as remainder.

    like vector[A], but instead consuming all bytes on decoding will try to consume all bytes that match for A and will leave last bytes that did not match as remainder. May encode to Vector.empty if A did not match at all.

    codec

    Codec for A

  62. def vectorVDelimited[A](codec: Codec[A], delimiter: Codec[Unit]): Codec[Vector[A]]

    Like VectorV, but the items are delimited by Delimiter.

    Like VectorV, but the items are delimited by Delimiter. Last item will not be terminated by delimiter

  63. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def xor[A](codec: Codec[A], or: BitVector): Codec[A]

    Performs Xor operation of codec with or

Inherited from AnyRef

Inherited from Any

Ungrouped