binary_payload library

Files carried inside a compiled executable: what a web-server build's binary reads its native library, web app and code units from.

Classes

DVAssetCodecs
The decoders a process has. gzip is dart:io's; brotli and zstd come from the native server library, which registers them when it is loaded.
DVAssetFile
One file of a site.
DVAssetPack
A pack, opened in place inside a file.
DVAssetPackEntry
One file going into a pack.
DVAssetSource
A site's files.
DVAssetSources
The sources this process serves from, by root.
DVBinaryPayload
Named sections read out of an executable.
DVDirectoryAssets
A site in a directory, as dartvel dev and dartvel preview serve it.
DVPackedAsset
A file in an opened pack.
DVPackedAssets
The files under prefix in a pack carried by this executable.

Enums

DVAssetEncoding
How a file's bytes are kept, and the Content-Encoding that names them.

Functions

dvAssetPath(String requestPath) → String?
The file a request path names, relative to the site; null for a path that is no file or would leave the site.
dvAssetWorthEncoding(String path) → bool
Whether the file at path is worth encoding at all.
dvExtractFiles(Uint8List packed, String parent) → String
Writes packed into a directory under parent named by its content, and returns that directory.
dvPackFiles(Map<String, List<int>> files) → Uint8List
files, keyed by relative path, as one gzip-compressed section.
dvUnpackFiles(List<int> packed) → Map<String, List<int>>
The files dvPackFiles packed.
dvWriteAssetPack(List<DVAssetPackEntry> entries) → Uint8List
entries as a pack.

Typedefs

DVAssetDecoder = Uint8List Function(Uint8List stored, int size)
Turns stored bytes back into the file they encode, given its size.