All Known Subinterfaces:
NumericCodecStage
All Known Implementing Classes:
DeltaCodecStage, GcdCodecStage, OffsetCodecStage

public interface TransformEncoder
Transforms values in-place as a non-terminal stage of the encode pipeline.

Unlike PayloadEncoder, transform stages do not write to a DataOutput. They modify the long[] array in-place and record any metadata needed for decoding via EncodingContext.metadata().

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encode(long[] values, int valueCount, EncodingContext context)
    Transforms values in-place and writes any metadata to the context.
    byte
    id()
    Returns the unique stage identifier.
  • Method Details

    • id

      byte id()
      Returns the unique stage identifier.
      Returns:
      the stage ID byte
    • encode

      void encode(long[] values, int valueCount, EncodingContext context)
      Transforms values in-place and writes any metadata to the context.

      If the stage determines that the transformation would not be effective, it may return without modifying the values or writing metadata. The pipeline checks EncodingContext.isStageApplied(int) to detect this.

      Parameters:
      values - the values to transform in-place
      valueCount - the number of valid values in the array
      context - the encoding context for metadata and stage tracking