object Identity extends Codec
- Source
- Identity.scala
- Alphabetic
- By Inheritance
- Identity
- Codec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def compress(bytes: ByteString): ByteString
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def isCompressed: Boolean
- Definition Classes
- Codec
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def uncompress(compressedBitSet: Boolean, bytes: ByteString, maxDecompressedSize: Int): ByteString
Process the given frame bytes, uncompress if the compression bit is set, enforcing a maximum decompressed size.
Process the given frame bytes, uncompress if the compression bit is set, enforcing a maximum decompressed size.
Delegates to
uncompress(bytes, maxDecompressedSize)so that codecs which can enforce the limit while decompressing (rather than after) get the chance to fail fast.- compressedBitSet
whether the compression bit is set
- bytes
the frame bytes
- maxDecompressedSize
the maximum allowed decompressed size in bytes
- def uncompress(bytes: ByteString, maxDecompressedSize: Int): ByteString
Decompress the given bytes, enforcing a maximum decompressed size.
Decompress the given bytes, enforcing a maximum decompressed size. Throws a
StatusExceptionwithRESOURCE_EXHAUSTEDif the decompressed output exceedsmaxDecompressedSize.This default implementation decompresses in full and checks afterwards, so it bounds what a caller receives but not what is allocated along the way. Codecs that can enforce the limit while decompressing should override it;
Gzipdoes.- bytes
the compressed bytes
- maxDecompressedSize
the maximum allowed decompressed size in bytes
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def uncompress(compressedBitSet: Boolean, bytes: ByteString): ByteString
Process the given frame bytes, uncompress if the compression bit is set.
Process the given frame bytes, uncompress if the compression bit is set. Identity codec will fail with a
io.grpc.StatusExceptionif the compressedBit is set.Places no bound on the decompressed size; prefer
uncompress(compressedBitSet, bytes, maxDecompressedSize). - def uncompress(bytes: ByteString): ByteString
Decompress the given bytes with no bound on the output size.
Decompress the given bytes with no bound on the output size.
A compressed frame can inflate to arbitrarily many bytes, so a caller that does not impose a limit is exposed to a decompression bomb. Prefer
uncompress(bytes, maxDecompressedSize), which fails withRESOURCE_EXHAUSTEDinstead of allocating without bound.