synology_apm_repo.sdk.format.const module

Dedup/bucket/composition constants.

Cross-module constants only; per-format header field offsets stay local to their module.

synology_apm_repo.sdk.format.const.BUCKET_ID_BIT_NUM = 40

Width of the bucketID field in a packed ChunkAddress.

synology_apm_repo.sdk.format.const.CHUNK_BIT_NUM = 16

Width of the chunkIdx field in a packed ChunkAddress — the address is (streamID << BUCKET_ID_BIT_NUM | bucketID) << CHUNK_BIT_NUM | chunkIdx.

synology_apm_repo.sdk.format.const.BUCKET_ID_LAYER_SHIFT = 10

The 10-bit layering shift of both Pool paths and Composition sub-paths, the same algorithm applied to different id domains (see FORMAT-SPEC.md, Pool path layering and Composition file splitting).

synology_apm_repo.sdk.format.const.GROUP_BUCKET_NUM = 1024

Buckets per .inf/.fgp/.ref group (1024).

synology_apm_repo.sdk.format.const.BUCKET_MAX_CHUNK_NUM = 8192

Chunks per bucket (8192), the carry threshold for ChunkAddress.advance. Overflow carries into bucketID at 8192, not at the packed field’s 16-bit width (65536).

synology_apm_repo.sdk.format.const.FIXED_CHUNK_LENGTH = 4096

The fixed chunk granularity; every chunk-map offset is a multiple of it.

synology_apm_repo.sdk.format.const.RESERVED_LENG = 4096

Uncompressed bucket layout’s data start offset.

synology_apm_repo.sdk.format.const.COMPRESS_RESERVED_LENG = 16384

Compressed bucket layout’s data start offset (64-byte header + SizeStore blob padded to this length), the layout current writers always use (FORMAT-SPEC.md: Header & mode bits).

synology_apm_repo.sdk.format.const.SIZE_STORE_REC_BIT_NUM = 15

Bits per chunk in the SizeStore bitstream — 3-bit CompressType + 12-bit size.

synology_apm_repo.sdk.format.const.CHUNK_CRC_SIZE = 4

Bytes per non-empty chunk’s entry in the (verify-only) ChunkCrcStore trailer.

synology_apm_repo.sdk.format.const.SUB_FILE_SIZE = 16777216

Composition sub-file size and the shift used to split a global offset into (sub_id, offset_within_subfile).

synology_apm_repo.sdk.format.const.RECORD_HEAD_LENGTH = 32

The byte length of a RecordHead, as FORMAT-SPEC.md’s RecordHead section defines it.

synology_apm_repo.sdk.format.const.CHUNK_MAP_RECORD_LENGTH = 20

The byte length of a ChunkMapRecord, as FORMAT-SPEC.md’s ChunkMapRecord section defines it.