(BGI): Support archive creation and compression#175
Open
Jair4x wants to merge 2 commits intocrskycode:masterfrom
Open
(BGI): Support archive creation and compression#175Jair4x wants to merge 2 commits intocrskycode:masterfrom
Jair4x wants to merge 2 commits intocrskycode:masterfrom
Conversation
Grabbed this PR again after about a week to check what did I do wrong. Fixed: - Files weren't actually being skipped, only packed uncompressed. Now we manage status via using an enum to signal what we do with each file and act accordingly. - Unnecessary duplicate logic for creation. Now it's a single function that accepts the amount of bytes used by the name fields and padding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Had to close the previous PR because I'm a dumbass and I made some commits that I shouldn't have
First (or rather, second) PR I make, so if code is sub-optimal or anything, feel free to scold me.
PR adds full write support for BGI .arc archive files, including DSC file compression with what I thought was the "simplest" way to manage encryption keys.
While yes, BGI accepts uncompressed files as "patch files", amounts and size of files can get atrocious, so that's the main reason behind this implementation.
Should work with most games unless they have any additional checks for files like Da Capo.
Also, compression ends up with ~5% of less file size compared to the original compression, even though you might not change anything in the files, and it still works just as fine.
Cheers!
Tested on:
Edelweiss - https://vndb.org/v903 (Packfile | BGI v1)
Pure X Connect - https://vndb.org/v16166 (BURIKO ARC | BGI v2)