Function applyGzipReplicationStep

Decode, parse and transactionally apply one GZIP-compressed replication step.

bool applyGzipReplicationStep(
  OsmStore store,
  transport.source.ByteSource compressedChange,
  scope ref const(ReplicationCheckpoint) checkpoint,
  scope ref const(ReplicationFeed) feed,
  scope ref const(ReplicationState) candidate,
  out ReplicationApplyResult result,
  out ReplicationIngestStatus status,
  ReplicationIngestOptions options = ReplicationIngestOptions(0LU, 0LU, 0LU, 0LU, OsmChangeReadOptions(0LU, 0LU, 0LU))
) @safe;

The compressed resource is read through transport-d in bounded chunks and decoded with compression-d's stable streaming GZIP contract. Decoded XML bytes are never materialized as a complete buffer: the existing osmChange reader consumes them through an internal absolute-offset ByteSource adapter.

The osmChange semantic document is still materialized before store mutation, matching applyReplicationStep's M19 transaction boundary. GZIP CRC-32/ISIZE, concatenated-member completion and trailing-garbage checks must all succeed before the document can reach applyReplicationStep.

The compressed ByteSource must describe a stable resource for the duration of this call. Generic retrieval, retries, scheduling and durable checkpoint persistence remain caller responsibilities.