xnm3YQNfEx / GOCSaveEditor

Gangsters Organized Crime Save Editor
MIT License
2 stars 0 forks source link

General refactor #9

Open xnm3YQNfEx opened 3 months ago

xnm3YQNfEx commented 3 months ago

Fix usage of Box<> and unwrap Look into if there is a better way of managing the 'readbuffer' using core rust types

Fix ownership and references Possibly remove some of the unused huffman coding for canonical codes, or include it in compression logic. Can't use for decompression, as it modifies paths in the tree, invalidating it. Move compression related code into a compression module Change the "HuffmanTable" module to something else. Maybe remove some of the unused code like the struct, and from_codes().

xnm3YQNfEx commented 3 months ago

Performed a first pass of a refactor Got rid of the custom readbuffer type in favor of using an iterator for the data Vec. Removed some unused code Moved all compression code into a compression module, with functions to take in Vec and return one rather than taking in file paths. Got rid of the HuffmanTable all together, just have it as an empty module with some of the higher level functions like encode and decode.

Still need to: