-
-
Notifications
You must be signed in to change notification settings - Fork 311
Comments
Fixed / Refactored SysZip to actually work, and store compressed entries without uncompressing an entire zip#761
Fixed / Refactored SysZip to actually work, and store compressed entries without uncompressing an entire zip #761ItsLJcool wants to merge 29 commits intoCodenameCrew:main from
Conversation
ItsLJcool
commented
Sep 4, 2025
There is an issue with streamed audio it seems like
ItsLJcool
commented
Sep 4, 2025
Seems the streamed audio bug was fixed, though now I found an issue with videos not loading properly so debugging that
ItsLJcool
commented
Sep 4, 2025
stupid fuckin hxvlc and VideoCutscene implementation
ItsLJcool
commented
Sep 4, 2025
there is still an issue with how videos are loaded so need to find a way to fix it...
ItsLJcool
commented
Sep 4, 2025
just fixed it by implementing what VideoCutscene did because it actually works amazing lmao
...'s fix for ZIP videos, and also removed that fix in favor for just fixing the issue entirely
ItsLJcool
commented
Sep 4, 2025
After some testing it seems all the issues have been fixed.
The only issue that can occur is if the Mod owner doesn't change their Flags.VIDEO_EXT when trying to load other video extensions, causing it to not be detected in ZipFolderLibrary but easy to figure out probably?
ItsLJcool
commented
Sep 4, 2025
ok adding a feature in rq that pre-caches each video in the mod because unzipping loading time takes a hot sec, and videos easily get desynced
...Library. Since videos have to be decompressed and be saved as a file anyways this reduces the time to do that, and what not.
ItsLJcool
commented
Sep 4, 2025
Alr makred as ready now !!
unless I find another bug again lmao
...ist to be passed as a `.zip`
ItsLJcool
commented
Sep 4, 2025
ughghghghghghhhhhh unready now, someone test zip mods with addons, and the new Flag I added to support custom zip extensions
ItsLJcool
commented
Sep 4, 2025
from my quick testing it seems like it works
...h .cnemod with a .zip inside LMAO)
...abilites to detect if a library is considered compressed
ItsLJcool
commented
Sep 5, 2025
Ok this branch is ready to merge. The Streamed Audio bug just seems to be a mod specific issue, and happens rarely often on that mod.
NexIsDumb
commented
Sep 8, 2025
is this 100% done?
ItsLJcool
commented
Sep 9, 2025
is this 100% done?
Doing final checks and it made me realize a flaw in how I wanted to load the .cnemod but fixing it right now
ItsLJcool
commented
Sep 15, 2025
ughhh need to fix literally every function that generates a script and search libraries to check instead of relying on openFL's Assets exists function
because compressed Libraries aren't folders, and are encrypted. So Assets.exists goes "huh not a folder, not valid!!!"
ItsLJcool
commented
Sep 15, 2025
NVM I was loading the mod wrong LMAO
NexIsDumb
commented
Sep 21, 2025
im just curious but if not even videos wont be uncompressed, i dont think the .temp folder would be needed anymore maybe?
NexIsDumb
commented
Sep 21, 2025
nvm, you're still saving the video
ItsLJcool
commented
Sep 21, 2025
im just curious but if not even videos wont be uncompressed, i dont think the .temp folder would be needed anymore maybe?
Well no because of like Haxe limitation and just to be safe, we are extracting videos into .temp so it can decode the MP4 directly instead of unziping the video everytime we want to play it, which
- Increases Lag
- More time to decode
- Storing the entire video in RAM
So it's just more Haxe friendly :)
ItsLJcool
commented
Sep 21, 2025
I will keep merging the branches cuz I am currently using this fork for a mod rn LMAO
I was about to merge this since zips are basically fucked in cne but does videos works at all
ItsLJcool
commented
Oct 8, 2025
I was about to merge this since zips are basically fucked in cne but does videos works at all
Yes this was a major issue I had to find an issue to fix lmao.
There was a class that depended on like the asset path returning [ZIP] and the path directly after, but with this commit that was removed and actually plays video cutscenes properly without having to check if the path contains a string, and will just use the method for getting the bytes directly from the ZipFolderLibrary, meaning it will check .temp/ for the video, and also has saftey checks to remove any video files with the same name but not in the same folder.
It also precaches all the videos in your .temp/ folder automatically but there really isn't a way to toggle it off yet, but there is code that supports it.
ZipFolderLibrary will only load videos based off of your Flags.VIDEO_EXT so if you don't change it in your mod / ini it won't properly load the video, but this only affects mods that don't care to think about the Flags class at all, when they really should and not fuck with things that might brick their mod.
You can read this on why it was done this way
Everything is really good to go, im still updating the repo and testing the Zip folder shit on a Pillar Funkin' dev mod build, but I also occasinally test zipping other mods to ensure nothing goes wrong.
ItsLJcool
commented
Oct 25, 2025
ts never being merged
lj sadge
ItsLJcool
commented
Oct 26, 2025
Been testing with new mods, Bergabash, Dustin', SAU (from Zoro) works fine, there is a slight issue though??
MultiFramesCollection or something along the lines gave an error, then crashed when playing some Dustin' songs when I switched mods..? I think it might actually be a Dustin' issue cuz it doesn't occur in the normal build itself, though not too sure.
Raltyro
commented
Nov 16, 2025
MultiFramesCollection crashes happens in normal cne too though only when switching mods, also sorry lj for not responding
MRK2009
commented
Nov 26, 2025
IT GOT CONFLICTED, BRUH!!!
ItsLJcool
commented
Feb 8, 2026
So I think this is Merge worthy now, the only issues with this PR is the ones we can't solve without having dedicated workflows for Compressed Libraries.
Issues:
- Accessing items in a directory in the Zip file requires you to decompress the folder and get the contents of the folder (each item inside is compressed)
- Creating new files is impossible with Compressed Libraries inside the mod, so things like Autosaving, creating new files, modifying files, etc. cannot occur in Compressed Libraries.
- Loading the Compressed Library for the first time takes ~1s per 1GiB (non-conclusive)
- Anything related to
FileSystem,File, etc won't work inside Compressed Libraries.
So we should advise mods that want to use Compressed Libraries to either account for these issues, or just don't use it.
This will be useful for addons, or big mods that would benefit from being compressed.
I tested out some mods but the results aren't really helpful, besides it verifying it properly decompresses files and doesn't bloat ram.
Since most mods didn't consider it being in a read-only state it's hard to gauge what is breaking and what is expected to be broken.
ItsLJcool
commented
Feb 8, 2026
Also it will take longer if the mod has a lot of videos to decompress, it will auto-decompress every video in the ./videos/ folder because it takes longer to decompress in runtime
MRK2009
commented
Feb 9, 2026
Okay now it's not conflicted, phew.
Uh oh!
There was an error while loading. Please reload this page.
Refactored
SysZipso that now it properly reads eachEntryand saves only required information to unzip anyEntryin the zip.It no longer extends
Readersince it's a custom implementation of unzipping by yours truely.This commit also added a
CoolUtilfunction for using thehaxe.Timer.stamp()function to quickly see how long it takes for code to run.Calling it once will start the timer, and call it again to finish the debug output. It also does fancy tracing. 👀
Edit:
This also adds a "cnemod" folder, this is how it can be loaded:
./mods/ModFolder/cnemod.zipor instead of.zipit can be a valid extension inALLOWED_ZIP_EXTENSIONS