linux-msm / qdl

BSD 3-Clause "New" or "Revised" License
225 stars 79 forks source link

Implement sparse image support #30

Open obbardc opened 2 years ago

obbardc commented 2 years ago

Based on original work from https://github.com/andersson/qdl/pull/5

Signed-off-by: Christopher Obbard chris.obbard@collabora.com

obbardc commented 2 years ago

cc @blenk92 @abozhinov444 @andersson @jwinarske @ndechesne

ndechesne commented 2 years ago

thanks for sending this PR.. support for sparse support is very much needed.. I am wondering if using libsparse is really a great thing though. First the distribution of libsparse in distro is not always great (I don't think Archlinux has it), and hardcoding the lib path like you did is problematic. Also, I think it complicates the main loop when processing the file quite a bit.. how difficult (or wrong?) would it be to implement a small 'unsparse' algorithm directly in qdl? would that be a bad idea?

jwinarske commented 2 years ago

@ndechesne I agree. It would be better to not pull in library dependency, and implement the sparse algorithm directly.

obbardc commented 2 years ago

Right, using the library is a bit of a pain. The other two open PRs vendor in libsparse. If that is acceptable, I can do that here too?