package avro-simple

  1. Overview
  2. Docs

Module Avro_simple.Codec_nullSource

Null compression codec (passthrough)

This codec provides a no-op compression implementation that passes data through without any transformation. It is useful as a baseline codec when no compression is desired or for testing purposes.

Sourcetype t = unit

The type of the null codec state. Since this is a passthrough codec, no state is needed.

Sourceval name : string

The codec name identifier.

Sourceval create : unit -> t

create () creates a new null codec instance.

  • returns

    A unit value representing the codec state.

Sourceval compress : t -> bytes -> bytes

compress codec data passes through the data without compression.

  • parameter codec

    The codec instance (ignored)

  • parameter data

    The data to compress

  • returns

    The original data unchanged

Sourceval decompress : t -> bytes -> bytes

decompress codec data passes through the data without decompression.

  • parameter codec

    The codec instance (ignored)

  • parameter data

    The data to decompress

  • returns

    The original data unchanged

Sourceval register : unit -> unit

register () registers this codec with the global codec registry.

This function makes the null codec available for use by name through the codec registry system.