Class MultiEventCompressedStringSerializer
java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<String>
ch.qos.logback.core.kryo.SerializerBase<String>
ch.qos.logback.classic.kryo.MultiEventCompressedStringSerializer
String serializer that DEFLATE-compresses long new string payloads as one
raw (nowrap) deflate stream for the life of this serializer instance.
New values shorter than SIZE_THRESHOLD_FOR_COMPRESSION UTF-8 bytes are written
unmodified ('U' + Kryo string). Longer new values are appended to the ongoing
deflate stream ('C' + length-prefixed Deflater.SYNC_FLUSH chunk). Cached
hits do not touch the deflater. Short and long new entries may be interleaved; only
'C' records advance compressor/decompressor state.
Uncompressed framing inside the deflate stream is int utf8Length (big-endian)
+ UTF-8 bytes. There is no gzip/zlib wrapper; record boundaries are the outer
chunkLength plus SYNC_FLUSH.
Wire format per new entry:
'U' Kryo string 'C' int chunkLength; byte[chunkLength] // next SYNC_FLUSH deflate segment
-
Nested Class Summary
Nested classes/interfaces inherited from class SerializerBase
SerializerBase.BiMapType -
Constructor Summary
ConstructorsConstructorDescriptionMultiEventCompressedStringSerializer(int capacity) MultiEventCompressedStringSerializer(SerializerBase.BiMapType biMapType, int capacity) -
Method Summary
Modifier and TypeMethodDescriptionvoidReleases the deflater.intprotected StringreadNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input) protected voidwriteNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, String value) Method called to write new entries.Methods inherited from class SerializerBase
read, writeMethods inherited from class com.esotericsoftware.kryo.kryo5.Serializer
copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
Constructor Details
-
MultiEventCompressedStringSerializer
-
MultiEventCompressedStringSerializer
-
-
Method Details
-
writeNewEntry
protected void writeNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, String value) Description copied from class:SerializerBaseMethod called to write new entries.- Specified by:
writeNewEntryin classSerializerBase<String>- Parameters:
kryo-output-value-
-
readNewEntry
protected String readNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input) - Specified by:
readNewEntryin classSerializerBase<String>
-
finishWrite
Releases the deflater. Not required for normal record streaming with sync-flush. -
getTotalGain
-