plougher / squashfs-tools

tools to create and extract Squashfs filesystems
GNU General Public License v2.0
740 stars 191 forks source link

mksquashfs and unsquashfs as a library #124

Open flxo opened 2 years ago

flxo commented 2 years ago

The project today is binary centric around the mksquashfs and unsquashfs binaries. Calling this binaries during a build can be annoying since the binaries need to be present on the system in the correct version. Calling foreign binaries is also something that may fail easily.

The idea is to split the two binaries into tree parts:

AgentD commented 2 years ago

So basically something like libsquashfs, which has a C API?

flxo commented 2 years ago

So basically something like libsquashfs, which has a C API?

Exactly. We tried to use squashfs-tools-ng but experienced various problems compared to the images created with the "old" mksquashfs. The API of squashfs-tools-ng is super powerful but hard to use if you just want to pack a dir with some pseudo files.

AgentD commented 2 years ago

A high level abstraction wrapper is implemented in squashfs-tools-ng internally, but it was not move to libsquashfs as there were some open questions regarding a generic enough design, and it was assumed that any filesystem manipulation code would already have it's own such layer that libsquashfs would be integrated into, rather than the other way around.

I opened a ticket for this. Additional feedback is always welcome.