Skip to content
Snippets Groups Projects
Commit 0090adcd authored by Jo-Philipp Wich's avatar Jo-Philipp Wich Committed by Felix Fietkau
Browse files

opkg: vfork external gzip command to uncompress data


Opkg's builtin decompression code is unsuitable to process nested archives as
it uses a single shared state and relies on undefined seek behaviour for pipes.

Rework the extraction logic to use the external gzip command as I/O filter for
decompressing data and remove the builtin inflate code entirely.

This shrinks the final opkg binary by about 4KB and results in less runtime
memory consumption due to efficient use of vfork() and less copy-on-write
operations in the forked child.

Rework by Felix: create a thread that relays data to the gzip process
instead of using a fragile poll loop

Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent d109d031
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment