object codec
- Source
- codec.scala
- Alphabetic
- By Inheritance
- codec
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- implicit final class ByteVectorCodecSyntax extends AnyVal
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- lazy val bitsWsRemoved: Codec[BitVector]
- lazy val boolAsString: Codec[Boolean]
-
def
bytesUntil(f: (Byte) ⇒ Boolean): Codec[ByteVector]
Decodes bytes util
f
holds.Decodes bytes util
f
holds. Encodes as identity - lazy val bytesWsRemoved: Codec[ByteVector]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
duration[N](units: TimeUnit, mkN: (Double) ⇒ N)(codec: Codec[N])(implicit N: Numeric[N]): Codec[FiniteDuration]
creates duration from specified units *
-
def
durationIntMs(codec: Codec[Int]): Codec[FiniteDuration]
encodes duration in Ms for Int *
-
val
epochTimestamp: Codec[Date]
encodes as ms since epoch *
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
lazy val
floatAsString: Codec[Float]
Float encoded as string value
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
lazy val
intAsString: Codec[Int]
Int encoded as string value
-
def
intBounded(codec: Codec[Int])(min: Int, max: Int): Codec[Int]
int codec, that allows min/max bounds inclusive *
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
longAsString: Codec[Long]
Int encoded as string value
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
predicate[A](c: Codec[A])(f: (A) ⇒ Option[String]): Codec[A]
Applies predicate
f
to check whetherA
was decoded successfully, or may be encoded.Applies predicate
f
to check whetherA
was decoded successfully, or may be encoded. Iff
yields to String, then this signals failure -
def
stringBounded(codec: Codec[String])(min: Int, max: Int): Codec[String]
string codec, that allows min/max bounds on size inclusive *
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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. Thencodec
is applied to getA
Remainder AFTER discriminator is returned -
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 thencodec
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 thencodec
is applied.The delimiter is not part of any remainder returned when decoding.
instead using delimiter to encode, encDelimiter is used.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
xor[A](codec: Codec[A], or: BitVector): Codec[A]
Performs Xor operation of
codec
withor