split_dyf3

split_dyf3(path, chunk_size=95000000)

Split a DYF3 file into chunks for transport (e.g. GitHub Pages).

Chunk 0 keeps the original filename (truncated to chunk_size). Chunks 1..N are written as path.1, path.2, etc. with raw continuation bytes (no headers). The n_chunks field in chunk 0’s header is patched in place.

Parameters

Name Type Description Default
path str Path to a DYF3 file (must already be format version 3). required
chunk_size int Maximum bytes per chunk. Default 95 MB (fits GitHub’s 100 MB per-file limit with margin). 95000000

Returns

Name Type Description
int Number of chunks (1 means no split was needed).

Raises

Name Type Description
ValueError If the file is not DYF3.