Skip to content

rockusb: support zstd-compressed images in write-bmap#64

Open
Yury-MonZon wants to merge 1 commit into
collabora:mainfrom
Yury-MonZon:zstd-support
Open

rockusb: support zstd-compressed images in write-bmap#64
Yury-MonZon wants to merge 1 commit into
collabora:mainfrom
Yury-MonZon:zstd-support

Conversation

@Yury-MonZon

@Yury-MonZon Yury-MonZon commented Jul 8, 2026

Copy link
Copy Markdown

Closes #65.

Add a .zst arm to write-bmap alongside the existing gzip handling, so compressed images can be flashed without decompressing them first.

The sync (libusb) path uses zstd::stream::read::Decoder, which decodes all concatenated frames to EOF by default. The async (nusb) path uses async_compression's ZstdDecoder, which defaults to first-frame-only; multiple_members(true) is enabled there so multi-frame images (e.g. from pzstd) match the sync path and are not silently truncated.

Deps: add zstd 0.13 (dev) and the zstd feature to async-compression.

Tested by flashing a .zst image via the libusb backend.

Add a ".zst" arm to write-bmap alongside the existing gzip handling, so
compressed images can be flashed without decompressing them first.

The sync (libusb) path uses zstd::stream::read::Decoder, which decodes
all concatenated frames to EOF by default. The async (nusb) path uses
async_compression's ZstdDecoder, which defaults to first-frame-only;
enable multiple_members(true) there so multi-frame images (e.g. from
pzstd) match the sync path and are not silently truncated.

Deps: add zstd 0.13 (dev) and the "zstd" feature to async-compression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

write-bmap: support zstd-compressed images

2 participants