Author Topic: RELEASE: VPC VP Compressor  (Read 1894 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.


HOW TO USE:
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


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

block_size
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


minimum_size
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


ignore_list
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"


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


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


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


compression_level
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


tag_compressed_vps
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
https://github.com/Shivansps/VPC_Compressor

Windows Build
https://github.com/Shivansps/VPC_Compressor/releases
« Last Edit: June 13, 2021, 09:26:38 am by ShivanSpS »