Author Topic: RELEASE: VPC VP Compressor  (Read 974 times)

0 Members and 1 Guest are viewing this topic.

Offline ShivanSpS

  • 210
RELEASE: VPC VP Compressor

VPC VP Compressor Tool
This tool is designed to compress VP files (and standalone files) using LZ4 compression in a format that FSO can read, this allows to use compressed files in FSO what saves disk space and improves HDD loading times.
This is supported starting from the 20210326 nightly or FSO 21.2 stable.

One way to use it is just to drop the executable into the folder with the files to be compressed, execute it and press any key, this will start compression of the current folder with default settings.

The second way is to register the Windows context menu entry, there is a .cmd provided for that, run that file with admin access and VPC should appear on windows context menu.
When using context menu option do not close the program before it has finished, otherwise you will have to go to the folder where the .exe is and manually delete wincomp.tmp and/or windecomp.tmp from the folder.

From version 1.2 you can compress and decompress entire folders from Windows context menu, great for mods that dont use vps.

Additionally, command line arguments are allowed, these are:
/compress_folder path_to_folder
/compress_file path_to_file
/decompress_folder path_to_folder
/decompress_file path_to_file

The configuration file is auto-generated the first time if it does not exist, this allow to change a few options.

This is the size in bytes of LZ4 compressed blocks, the higher this number is, the smaller the output files are due to reduced overhead, but it will also use a little more memory to decompress.
Default value is 65536

This is the minimum size in bytes that a file has to be to be compressed, this is used as a optimisation to avoid compressing files that are not worth it. This could be set 0 without any problem since files that end up bigger than original are ignored.
Default value is 10240

This is the list of file extension to be ignored for compression, there is no issue in compressing every format, but i recommend to avoid audio.
Default value is ".ogg .wav .fc2 .fs2 .tbm .tbl"

The max number of compression threads, this is the maximum amount of simultaneous compression tasks.
Default value is 4

This setting allows for converting .pof files from version 2117 to version 2200 format. This is the pof_aligner code.
Default value 1 (enabled)

Enabling this option makes VPC to only compress vp files and ignore everything else on the folder.
Default value 0 (disabled)

This is the compression setting that is passed to the LZ4 compressor, a higher level means slower compression but smaller file size, it should have no effect on FSO decompression speed.
This can be set from 1 to 12, that being: 1 to 4 standard LZ4 compression, 5 to 12 LZ4-HC compression.
Default value is 6

Enabling this option will add "_vpc" to the vp name if the VP contains at least 1 compressed file inside. It is know to cause issues, not recommended.
Default value is 0 (disabled)

Source Code

Windows Build
« Last Edit: June 13, 2021, 09:26:38 am by ShivanSpS »