Coder Social home page Coder Social logo

iridiumio / compactgui Goto Github PK

View Code? Open in Web Editor NEW
4.9K 94.0 228.0 4.21 MB

Transparently compress active games and programs using Windows 10/11 APIs

License: GNU General Public License v3.0

Visual Basic .NET 100.00%
compression standalone windows game compressing-folders windows-10 vbnet dotnet6 wpf windows11

compactgui's People

Contributors

ehea617 avatar eta0 avatar iridium-io avatar spoonofdoom avatar wcogan avatar yyjdelete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compactgui's Issues

Wiki Result: Epic Games Fortnie

Of 3234 files within 67 directories
873 are compressed and 2361 are not compressed.
16 399 978 621 total bytes of data are stored in 4 924 101 807 bytes.
The compression ratio is 3,3 to 1.

XPRESS16K

Doesn't work properly on Non-English systems

Hey,

I just ran the tool on a folder and got this. Doesn't do anything for about an hour now.

I think I found the problem: In the file "Compact.vb" the process "MyProcess_OuputDataReceived" checks for english output lines. This obviously fails when compact.exe returns german lines, which may pose an issue on other languages, too. Not sure how localized most of them are.

The proper translations seem to be:

"total bytes of data are stored in" -> "Datenbytes insgesamt werden in %i Bytes gespeichert"  

"The compression ratio is" -> "Das Komprimierungsverh„ltnis ist" #note: "„" should be "ä"  

"directories were uncompressed" -> "waren nicht komprimiert" #probably a bad translation on MS' part here, if this is supposed to indicate the number of files that have just been uncompressed. German means "files that were not compressed"  

" Compressing files in" -> "Komprimieren der Dateien in"  

"[OK]" -> "[OK]" #no change here  

" are not compressed." -> "nicht komprimiert." #this will also trigger on the entry for "directories were uncompressed". Maybe move that entry into a nested if-condition here?  

" Listing " ->" Auflisten von "  

I'll try to fix this on my system and create a branch if I get it working. I haven't looked through the whole source to see if there's more checks for localized output. Also, I never worked with VB before >_>

To ultimately fix this and make it available on more languages, the string should probably be put into a database (XML or JSON?) and be loaded upon start of the program.
Getting the System Locale should be possible, although I've only done this in C# before and don't know how to do this in VB. Otherwise you can probably hack it together by checking the copyright notice in the output.

Wiki Result: Elite Dangerous

Elite Dangerous | XPress16K | 26 GB | 26 GB | 100%

This did compress (226 MB saved) but very badly. Also took 5 hours on a fast machine with an SSD. I think the problem is the game has a lot of very small files.

Wiki result: Black Desert Online

Black Desert Online | XPress16K | 52GB | 52GB | 99.2%

Most files are in .paz format and compress algorythm ignores them. It compressed most of the normal files though ,saving 426MB by doing that.

Add ability to cancel in-progress compression

Add a cancel button to cancel in progress compression without leaving behind processes.

If the window is closed while a compression is running, the compression child process is left running.

image

Set background

Please set background to white. I use dark theme, it's hard to read.
image

Compressing folders that are several gigabytes in size may result in an Arithmetic Overflow at the end

I've probably used a signed integer somewhere I shouldn't :/

  • Compression will complete without issue. This is a purely cosmetic bug
  • Compression overview will not show because of the error.
System.OverflowException: Arithmetic operation resulted in an overflow.
   at CompactGUI.Compact.CalculateSaving() in \Compact.vb:line 465
   at CompactGUI.Compact.ProgressTimer_Tick(Object sender, EventArgs e) in \Compact.vb:line 179
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
1938 files within 177 directories were compressed.
13,295,326,334 total bytes of data are stored in 12,246,654,104 bytes.
The compression ratio is 1.1 to 1.

Estimation of compression

Are you able to implement a feature to estimate the amount of space gained between different levels of compression? That's mainly to understand whether it's worth doing it or not.
Obliviously it has to be quicker than running the normal compression with +-5% inaccuracy so we can have an idea of compression gained on a big folder.
I may be wrong but so far I've noticed speed mainly depends on the file size. The bigger the file, the longer it takes to compress. So I assume the analysis would be identical.

Wiki Result: Titanfall 2

Of 1875 files within 33 directories
1195 are compressed and 680 are not compressed.
67 974 622 890 total bytes of data are stored in 43 091 183 806 bytes.
The compression ratio is 1,6 to 1.

XPRESS16K

Wiki Result: Gwent

Of 1272 files within 37 directories
281 are compressed and 991 are not compressed.
2 783 967 878 total bytes of data are stored in 2 285 734 185 bytes.
The compression ratio is 1,2 to 1.

XPRESS16K

Resizeable areas

When maximized or resized the window looks odd (see below).
It's possible to the text area be resize-able or automatically expands when resizing parent window?

Better alternative to Wiki table / posting additions as issues?

I think it would be better to use Google Sheets instead of the current Wiki table method, as posting all additions as their own issues isn't very efficient, and you are also relying heavily on users understanding how to format the tables properly themselves, and them not adding duplicate entries. Google Sheets would allow you to use formulas for size reduction calculations (both MB and %) to simplify what users need to add. It would also make sorting easier, especially for removing duplicate entries. You could either open it to fully public editing, or maybe add a second sheet for pending entries (so nobody can modify the proper entries). Rough example, using my library: https://i.imgur.com/mBBGFBd.png

Is the value of original/compressed size wrong?

I have a case where the original size/compressed size value was incorrect after compression and I wonder whether it's because it didn't compress all files or whether it stopped.

  • Folder is 30GB. After compression it says: original size: 9GB, compressed 8GB.
  • If I come back and run the check compression, I get proper values original: 30GB, compressed: 29GB.
  • I uncompress the folder
  • Run gain the compression again and same problem.

Looking at detail report, it says
2126 files within 218 directories were compressed.
9 319 215 229 total bytes of data are stored in 8 624 949 615 bytes.
The compression ratio is 1,1 to 1.

The actual folder is
32 359 424 574 bytes
10288 files and 801 directories.

So did it skipped files? If yes, it should mentioned in the report.
If not, there might be an issue... Thanks !

Unhandled exception after compressing

507 files within 18 directories were compressed.
5ÿ492ÿ359ÿ383 total bytes of data are stored in 1ÿ695ÿ713ÿ666 bytes.
The compression ratio is 3,2 to 1.

Error message at the end of each compression. Clicking OK doesn't seem to be doing anything. Compression seems to be working properly, just a .net arror.

> ************** Exception Text **************
> System.InvalidCastException: Conversion from string "5ÿ492ÿ359ÿ383" to type 'Long' is not valid. ---> System.FormatException: Input string was not in a correct format.
>    at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDecimal(String Value, NumberFormatInfo NumberFormat)
>    at Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(String Value)
>    --- End of inner exception stack trace ---
>    at Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(String Value)
>    at CompactGUI.Compact.CalculateSaving()
>    at CompactGUI.Compact.ProgressTimer_Tick(Object sender, EventArgs e)
>    at System.Windows.Forms.Timer.OnTick(EventArgs e)
>    at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
>    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

> ----------------------------------------

Ran the compression a second time and same error but different string:

System.InvalidCastException: Conversion from string "723ÿ330" to type 'Long' is not valid. ---> System.FormatException: Input string was not in a correct format.

Ps: this tool is amazing ! Thanks a lot.
Would be great to have a decompression feature when selecting a compressed folder.

Add ability to undo compression

Tried to uncompress the files using the command line: compact /u /s "folder" and it did not work for files compacted with compact GUI ? Also no ability to uncompress files using Compact GUI.

Wiki Result: Need for Speed (2015)

Of 169 files within 26 directories
107 are compressed and 62 are not compressed.
14 639 597 419 total bytes of data are stored in 13 058 739 218 bytes.
The compression ratio is 1,1 to 1.

XPRESS16K

Wiki Result: Unreal Tournament 4 Alpha

Of 2467 files within 345 directories
714 are compressed and 1753 are not compressed.
20 771 506 189 total bytes of data are stored in 3 009 219 993 bytes.
The compression ratio is 6,9 to 1.

XPRESS16K

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.