Class SnappyBlock

java.lang.Object
org.mockserver.metrics.remotewrite.SnappyBlock

public final class SnappyBlock extends Object
Snappy compression in the raw block format that the Prometheus remote-write protocol requires (NOT the framed/streaming format). Thin wrapper over Snappy.compress(byte[]) so the exporter and tests share one canonical implementation.
  • Method Details

    • compress

      public static byte[] compress(byte[] raw)
      Compress raw into the Snappy block format. Wraps the checked IOException thrown by snappy-java (compression of an in-memory byte array does not do real I/O) in an UncheckedIOException so callers can treat it as a normal runtime failure; the exporter catches it and fails soft.