Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

maxcso PSP

From GameBrew
Revision as of 07:14, 29 August 2024 by HydeWing (talk | contribs) (Created page with "{{Infobox PSP Homebrews |title=maxcso |image=maxcso.png |description=A fast cso compressor. |author=Various authors |lastupdated=2021/05/02 |type=File Operation |format=exe |version=1.13.0 |license=ISC |download=https://dlhb.gamebrew.org/psphomebrew/maxcso.7z |website=https://github.com/unknownbrackets/maxcso |source=https://github.com/unknownbrackets/maxcso }} {{lowercase title}} maxcso is a fast ISO to CSO compression program for use with PSP and PS2 emulators, which u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
maxcso
Maxcso.png
General
AuthorVarious authors
TypeFile Operation
Version1.13.0
LicenseISC
Last Updated2021/05/02
Links
Download
Website
Source

maxcso is a fast ISO to CSO compression program for use with PSP and PS2 emulators, which uses multiple algorithms for best compression ratio.

It has been tested on Windows, macOS, and Linux.

Features

  • Can use as many CPU cores as you want.
  • Can use zlib7-zip's deflate, and Zopfli.
  • Processes multiple files in one command.
  • Can take a CSO or DAX file as a source.
  • Able to output at larger block sizes.
  • Support for experimental CSO v2 and ZSO formats using lz4 (faster decompression.)
  • Tuning of deflate or lz4 compression threshold.
  • Decompression of all supported inputs (including DAX and CSO v2.)

User guide

Note: The 32bit version is slower. Use only when 64bit cannot be used.

Compression

maxcso always uses compression level 9. Decompression speed is about the same regardless of level, and disk access is faster with smaller files.

Using 7-zip's deflate and Zopfli improves compression ratios, but don't expect a lot. Usual results are between 0.5% to 1.0% smaller.

Larger block sizes than the default will help compression, in the range of 2-3%. However, the files may not be compatible with some software. For example, PPSSPP versions released after 2014-10-26 will support larger block sizes.

Avoid DAX where CSOs using larger block sizes are supported, since DAX is less efficient.

LZ4 support is mostly for experimentation.

Commands

Usage: maxcso [--args] input.iso [-o output.cso]

Multiple files may be specified.  Inputs can be iso or cso files.

   --threads=N      Specify N threads for I/O and compression
   --quiet          Suppress status output
   --crc            Log CRC32 checksums, ignore output files and methods
   --measure        Measure compressed size without saving output
   --fast           Use only basic zlib or lz4 for fastest result
   --decompress     Write out to raw ISO, decompressing as needed
   --block=N        Specify a block size (default depends on iso size)
                    Many readers only support the 2048 size
   --format=VER     Specify cso version (options: cso1, cso2, zso, dax)
                    These are experimental, default is cso1
   --use-zlib       Enable trials with zlib for deflate compression
   --use-zopfli     Enable trials with Zopfli for deflate compression
   --use-7zdeflate  Enable trials with 7-zip's deflate compression
   --use-lz4        Enable trials with lz4hc for lz4 compression
   --use-lz4brute   Enable bruteforce trials with lz4hc for lz4 compression
   --use-libdeflate Enable trials with libdeflate compression
   --only-METHOD    Only allow a certain compression method (zlib, etc. above)
   --no-METHOD      Disable a certain compression method (zlib, etc. above)
                    The default is to use zlib and 7zdeflate only
   --lz4-cost=N     Allow lz4 to increase block size by N% at most (cso2 only)
   --orig-cost=N    Allow uncompressed to increase block size by N% at most
   --output-path=X  Output to path X/, use basename for default outputs

Because Zopfli is significantly slower than the other methods, and uses a lot more memory, it is disabled by default. Add --use-zopfli for maximum compression.

Libdeflate is also disabled by default, because its output is not compatible with some PSP CFW. When not using PSP CFW, --use-libdeflate may improve compression a bit.

The cost arguments enable you to allow each block to be N% bigger by using lz4 or no compression. This makes the file read faster (less cpu power), but take more space.

Batch processing

On Windows, you can use a cmd or batch file to simplify arguments when using drag-and-drop. Create the file in the same directory as maxcso.exe, and then drag files into the batch file.

For example, to maximize compression of PS2 ISO files for use with an emulator, use this:

@echo off
"%~dp0\maxcso.exe" --use-zopfli --block=16384 %*
pause

(--use-zopfli makes this very slow, but you can try other arguments.)

Similarly, to create CSOs in a "compressed" folder, use this: (create the "compressed" folder next to the batch file.)

@echo off
"%~dp0\maxcso.exe" "--output-path=%~dp0\compressed/" %*
pause

More complex batch scripts can be created, but these are simple to start with. See the examples folder for some samples to try.

Changelog

v1.13.0 2021/05/02

  • Add libdeflate trials by default.
  • Correct Windows fileshare path support.
  • Show final percentage on completion.
  • Add measure option to see size without output.
  • Update to latest versions of dependencies.

v1.11.0 2019/05/26

  • Fix issue building with system libuv.
  • Decompress 16K+ block size CSOs correctly.
  • Compress ISOs not aligned to block size correctly (2048 alignment still required.)
  • Generate filenames properly when they include multiple dots.
  • Small I/O optimization.

v1.10.0 2018/04/08

  • Support for DAX output.
  • Faster decompression of large block sizes.

v1.9.1 2018/03/19

  • Allow flag override in Makefile.
  • Update 7-zip and libuv code.
  • Tune 7-zip deflate parameters better.

v1.9.0 2017/09/11

  • Update zopfli and use PGO - ~25% faster, ~0.5% smaller.

v1.8.0 2017/05/05

  • Support for Mac and Linux.

v1.7.2 2016/03/24

  • Correct single-arg syntax breakage after Unicode changes.

v1.7.1 2016/03/23

  • Fix bug in wildcard handling on Windows.

v1.7.0 2016/03/23

  • Add support for Unicode paths on Windows.

v1.6.0 2015/11/16

  • Add wildcard support, exit code, and smarter default block size.

v1.5.0 2015/10/12

  • Add decompress feature and update dependencies.

v1.4.6 2015/04/12

  • Fix over-read error near end of some larger block size CSOs.

v1.4.5 2015/04/12

  • Support > 4GB iso files.

v1.4.4 2015/04/03

  • This corrects an issue present only when the iso size was not aligned with the block size.

v1.4.3 2014/11/02

  • Fix a bug reading in cso files introduced recently.

v1.4.2 2014/11/02

  • Correction for the last fix, for larger block sizes that don't align to the source size.

v1.4.1 2014/11/02

  • Fix a bug when using a larger block size that did not align to the source file size.

v1.4.0 2014/11/02

  • Add the ability to use larger block sizes (up to 256KB), and add experimental lz4 formats (zso and cso v2.)
  • The new lz4 formats are not enabled by default.

v1.3.0 2014/10/27

  • Add support for larger block sizes.

v1.2.0 2014/10/26

  • Add a feature to calculate a crc32 checksum of iso or cso files.
  • Also, fix an issue with processing multiple files in a single command.

v1.1.1 2014/10/26

  • Bugfix from v1.1.0, fixing a memory leak.

v1.1.0 2014/10/26

  • Updated release with support for reading DAX files.
  • This fixes a few possible bugs as well. Up to a 15% improvement in speed for --fast, when the source file is already in memory. Likely less otherwise.

v1.0.0 2014/10/26

  • Initial release.

Credits

The larger portion of code here is from others' wonderful work in decompression and I/O libraries. Licensing is as follows:

  • maxcso is licensed under ISC.
  • 7-zip and p7zip are licensed under LGPL.
  • Zopfli is licensed under Apache 2.0.
  • libuv and libdeflate are licensed under MIT.
  • zlib is licensed under zlib.
  • lz4 is licensed under BSD.

Other tools:

External links

Advertising: