mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-03 21:30:35 +00:00
[PR #56] [MERGED] Extract Ms-cabs while reading instead of loading all datablocks into memory #91
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/SabreTools/SabreTools.Serialization/pull/56
Author: @HeroponRikiBestest
Created: 1/15/2026
Status: ✅ Merged
Merged: 1/24/2026
Merged by: @mnadareski
Base:
main← Head:mscab-read-extract📝 Commits (10+)
481e85dWIP962167aWIP 225c29ebTodo: you're missing a read somehow and getting misaligned by two bytes? maybe properly implementing the buffer will magically fix it91e2c48continued blocks my behated7e66a9fPre-major-testingebfa57dForgot to add summaries15d9c27Attempt to properly roll back. The state i wanted to roll back to wasn't in a commit before.b8be815Figured out the issue with the rolled back commit, this has to be a while loop because of 0 byte files. Reimplemented clean code.631b46bComment so I don't forget why it's like thisb2302c1Skip unsupported compression types before opening filestream.📊 Changes
3 files changed (+348 additions, -318 deletions)
View changed files
📝
SabreTools.Serialization/Readers/MicrosoftCabinet.cs(+4 -4)📝
SabreTools.Serialization/Wrappers/MicrosoftCabinet.Extraction.cs(+324 -137)📝
SabreTools.Serialization/Wrappers/MicrosoftCabinet.cs(+20 -177)📄 Description
Also fixes https://github.com/SabreTools/SabreTools.Serialization/issues/44 somehow.
While this is marked as draft, it's basically done. The only things I still want to do are add failsafes so that as much extraction as possible can continue to happen if errors occur, fix some edge cases (at present, I only know of one file in one cab set that's a regression, the other issues seem to have already been present), and convert most of my TODOs into PR comments. While I did mention before that I wanted to split up the main extraction loop, trying to do so resulted in some really ugly code due to how much state needs to be shared, so I went back on that. I'm perfectly fine with splitting things up if still asked, though.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.