Skip to content

(BGI): Support archive creation and compression#175

Open
Jair4x wants to merge 2 commits intocrskycode:masterfrom
Jair4x:master
Open

(BGI): Support archive creation and compression#175
Jair4x wants to merge 2 commits intocrskycode:masterfrom
Jair4x:master

Conversation

@Jair4x
Copy link

@Jair4x Jair4x commented Mar 13, 2026

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)

Jair4x added 2 commits March 13, 2026 19:55
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant