|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Optional gzip-only source with bounded RAM checkpoints and cancellable replay. Logical offsets are decompressed byte offsets. Exact logical extent is unknown until every concatenated member and physical EOF have been validated. Gzip headers, CRC/ISIZE, truncation and trailing garbage are checked strictly. Previously returned bytes can precede a later member-integrity error; they do not prove whole-archive validity. A failing read publishes none of that call's partial output, and never reports clean EOF. More...
#include <gzip_document.hpp>
Public Member Functions | |
| ~GzipDocumentProvider () override | |
| Release all states before their allocator/root owners. | |
| ByteDocumentCapabilities | capabilities () const noexcept override |
| std::size_t | pinnedBudgetBytes (const SourceBudget &root) const noexcept override |
| bool | tryReleaseOptionalStorage () noexcept override |
| std::expected< ByteDocumentMetadata, DocumentError > | metadata (std::stop_token stop) override |
| std::expected< ByteDocumentMetadata, DocumentError > | discoverExtent (std::stop_token stop) override |
| std::expected< ByteReadResult, DocumentError > | read (const ByteReadCommand &command, std::span< std::byte > destination, std::stop_token stop) override |
| Public Member Functions inherited from portals::ByteDocumentProvider | |
| virtual | ~ByteDocumentProvider ()=default |
| Safe final destruction after worker release. | |
| virtual std::expected< std::unique_ptr< ByteDocumentReadSession >, DocumentError > | openReadSession (std::stop_token stop) |
Static Public Member Functions | |
| static std::expected< std::shared_ptr< GzipDocumentProvider >, DocumentError > | create (std::shared_ptr< ByteDocumentProvider > compressed, std::shared_ptr< SourceBudget > budget, GzipDocumentOptions options={}) |
Optional gzip-only source with bounded RAM checkpoints and cancellable replay. Logical offsets are decompressed byte offsets. Exact logical extent is unknown until every concatenated member and physical EOF have been validated. Gzip headers, CRC/ISIZE, truncation and trailing garbage are checked strictly. Previously returned bytes can precede a later member-integrity error; they do not prove whole-archive validity. A failing read publishes none of that call's partial output, and never reports clean EOF.
One provider serializes its operations. Do not concurrently access the same compressed provider through other wrappers; share this gzip provider instead. The first observed compressed revision is frozen. A change requires a new adapter; live compressed append/follow mode and disk caching are not provided. Cold seeks can replay from the beginning and occupy a worker for a long time. Cancellation is checked between bounded inflate/I/O quanta; a mutex wait or an underlying blocking read cannot be forcibly interrupted by this adapter.
|
overridevirtualnoexcept |
Implements portals::ByteDocumentProvider.
|
static |
| compressed | Seekable compressed provider retained by the adapter. |
| budget | The same root subsequently used by ByteDocumentSource/views. |
| options | Bounded workspace, checkpoints, replay and header limits. |
|
overridevirtual |
| stop | Cooperative cancellation between bounded inflate/input quanta. |
Reimplemented from portals::ByteDocumentProvider.
|
overridevirtual |
| stop | Cooperative cancellation; underlying metadata obeys its own cancellation contract. |
Implements portals::ByteDocumentProvider.
|
overridevirtualnoexcept |
| root | Root whose non-evictable storage is observed. |
Reimplemented from portals::ByteDocumentProvider.
|
overridevirtual |
| command | Frozen revision and requested decompressed byte offset. |
| destination | Bounded output storage borrowed for this call only. |
| stop | Cooperative cancellation between bounded inflate/input quanta. |
Implements portals::ByteDocumentProvider.
|
overridevirtualnoexcept |
Reimplemented from portals::ByteDocumentProvider.