Motivation
The checkin operation will compress every file to store it inside a Plastic SCM repository. This is usually extremely good for text files where the compression ratio is pretty high. On the other hand, it's not great for binary files that can't be compressed; it is actually worse since the operation will spend precious time trying to achieve a good compression.
This will, obviously, delay the checkin operation and the user experience will be affected.
How to disable the compression for certain file types?
We added a new configuration file called "compression.conf" that enables a custom configuration of the compression method used to store the new version of a file in the repository. The compression.conf file can be defined at the following locations:
- Root path of the workspace: Will only be taken into account for that workspace.
- Local User config directory (typically at \Users\AppData\Local\plastic4): The rules will apply for all the machine workspaces.
If both files exist at both locations their rules will be combined.
'compression.conf' format
Each line of the compression.conf file will define a rule to match followed by ':', and the compression type to use. We currently have two compression methods supported, 'none' and 'zip'. For example:
.jpg:none |
Notice that the default compression type is "zip" so if nothing is specified for a certain filetype "zip" will be used.
There are 4 types of rules that can be specified, and the order of application is the following:
- File path rule (/dir/foo.png)
- File name rule (foo.png)
- File extension rule (.png)
- Wildcard rule (/**/foo*.???)
If a file path matches with a path rule, that will be the chosen compression type. If not, it will try to match with a file name rule, and so on.