Closed bananaturtlesandwich closed 8 months ago
not sure if it should be kept as a feature since there's no dependencies it needs
I now remember why I was hesitant to implement this. The simple implementation creates a messy API and means oodle must always be loaded up front whether it's actually used or not. I think these could be alleviated by using the builder pattern and instead of passing a function pointer directly, pass a function which can be called to fetch oodle only when necessary:
fn get_oodle() -> Result<DECOMPRESS> {
// lazily fetch the decompress function when necessary
}
let pak_reader = PakReaderBuilder::new(reader)
.oodle(get_oodle)
.build()?;
I think this may also work really nicely for entering AES keys.
Also I'm hesitant to remove the DLL download from the library entirely. I'll probably have to copy the implementation to a few different projects so may as well leave a central implementation in case anyone wants to use it.
ooh that's a really nice point about the builder pattern - with encryption disabled the .aes()
can be missed
as for the second point i think that would be better as a separate package on this repo
this sounds like it just needs a fresh branch so gonna close this PR
oh wait nvm it's salvageable lol
might be better to have a oodle init function rather than pass in builder since it only needs to be called once
this should be good now
wait need to fix tests
fixed now
OodleLZ_Decompress
function to repak - this allows flexibility in how the problem of oodle being proprietary is handled