Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major code revamp #5

Merged
merged 16 commits into from
May 18, 2022
Merged

Major code revamp #5

merged 16 commits into from
May 18, 2022

Conversation

siblount
Copy link
Owner

A major revamp of the extraction pipeline has been long overdue. In summary, there have been some performance boosts and significant code refactoring for better productivity in prep for new contributors. Additionally, some functions aside from the extraction pipeline have been moved to different classes or removed entirely.

Highlights

  • Instead of the interface IDPWorkingFile, all files that are discovered from archives are of base type DPAbstractFile.
  • New classes that clearly represent what it's supposed to do
    • DPRARArchive, DP7zArchive, DPZipArchive for example
  • Seperated some classes to have their own file such as DSX.
  • DPProcessor purpose is now to determine where files are extracted and handle user interactions if necessary.
  • Added some documentation.

siblount added 16 commits May 10, 2022 20:17
Instead of the interface IDPWorkingFile, all files that are discovered from archives are of base type DPAbstractFile.

DPFile is still the same and inherits DPAbstractFile

DPAbstractFile will be the abstract class for archive files which inherits DPAbstractFile.

DPRARFile inherits from DPAbstractArchive and same for 7z and Zip

Added a few structures and enums as well.

Removed and revamped some code for performance or memory improvements.
Root contents and contents are back to List type (from Dictionary).
- DSXElement is now DPDSXElement
- DSXFile is now DPDSXElementCollection
- DSXParser is now DPDSXParser

Some performance and memory improvements have been made as well.
Removed LibraryIO and SQLRegexFunction
A revamp of the extraction process. In summary, there have been some performance boosts and significant code refactoring for better productivity in prep for new contributors.

- Functions such as `ProcessRAR`, `ProcessZip`, `Process7Z `have 1) their own class such as `DPRarArchive and have been integrated into the required `Extract` and `Peek` methods.
- All files detected in an archive has the base class `DPAbstractFile`.
- `DPProcessor` purpose is now to determine where files are extracted and handle user interactions if necessary.
- All files that are not a supported archive type are of class `DPFile`.
- Some meta files such as `.dsx` and `.duf` have their own classes.
   - `.dsx` files will use the `DPDSXFile` class that allows reading the file when needed.
- '.dsx' files will use the `DPDazFile` that allows reading the user content files whether it's gzipped or not. It only reads the first 10 lines for tag creation.
- Updated `DPAbstractFile` and `DPAbstractArchive`.
- And many more.
Use span for string manipulation.
bye bye o( ̄▽ ̄)d
Fixed errors regarding the extension of a file name - now uses `DPAbstractFile.GetExtension()` to determine the extension; which is the extension without the dot.

Fixed AddNewProgressCombo Invoke with no paramater.

Fixed multiple instances regarding DPProgressCombo.
- Fixed multiple issues where RelativePath was null.
- Fixed issue with RAR archive extracting creating additional directories along with the file (we only want the file).
- Fixed issue where all files were going to temp directory instead of only archives going to temp directory.
- Checks have been added to make sure that a file has been extracted before processing for Manifest File, processing inner archives, etc.
- Fixed a (suprising) long-time bug with GetContentFolder().
- DPAbstractArchive now has a method to get rid of file handle of the archive once we are finished.
- Fixed a logic issue with GetRelativePath.
@siblount siblount self-assigned this May 18, 2022
@siblount siblount merged commit ed05799 into main May 18, 2022
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