# Default\_compressed\_extensions.txt on linux system is case sensitive

**URL:** https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084
**Category:** Support
**Created:** [March 30, 2021, 9:51pm UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084 "2021-03-30T21:51:46Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![asman](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@asman](https://forum.duplicati.com/u/asman)
#### Post date: [March 30, 2021, 9:51pm UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/1 "2021-03-30T21:51:46Z")

</div>

Hi.  
After long searching I found the reason for my performance problems. The default\_compressed\_extensions.txt does not work out of the box on Linux systems.

Seems the comparison is case sensitive, and all pics and videos with extensions xxx.MOV, yyy.JPG, zzz.MP4 are compressed - because only .mov .jpg .mp4 are mentionen in the default\_compressed\_extensions.txt

Is there any good way to make this case insensitive, without doubling all the entries in the default\_compressed\_extensions.txt file? (and if I double it, special cases like .Jpg are not covered as well)

Don’t get me wrong - the default extensions file is really great and I appreciate it. Would just be good to handle all cases on Linux systems.

---

<div class="post-metadata">

### Author: ![Xavron](https://forum.duplicati.com/user_avatar/forum.duplicati.com/xavron/32/5539_2.png) [@Xavron](https://forum.duplicati.com/u/Xavron)
#### Post date: [March 31, 2021, 12:06am UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/2 "2021-03-31T00:06:35Z")

</div>

Not seeing any case insensitivity for this in the docs or in the code.

It looks limited in the code to look at as they switch to other values and pass that around so it shouldn’t be able to be re-checked for sensitivity just anywhere in the code. Thus, I don’t think I missed anything.

The probable things looks to be to download and use source with your change, write the code into a setting and submit that, or use something like Libre Office or Microsoft Office / Word to far more quickly switch the cases and duplicate into the file with the case changes.

Also, maybe using the terminal to adjust all cases of the files but that would affect the backup so you would probably want to redo the backup fresh after this one.

Or use the filters in Duplicati but I didn’t check to see if this is also or not. Just throwing that in. It does have a text box as well which might be this for all I know.

From what I see that’s what you have to work with.

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [March 31, 2021, 12:11am UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/3 "2021-03-31T00:11:49Z")

</div>

Good find and thanks for reporting. Are you able to open an issue on the Github page? This should be trivial to fix.

---

<div class="post-metadata">

### Author: ![Xavron](https://forum.duplicati.com/user_avatar/forum.duplicati.com/xavron/32/5539_2.png) [@Xavron](https://forum.duplicati.com/u/Xavron)
#### Post date: [March 31, 2021, 12:36am UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/4 "2021-03-31T00:36:34Z")

</div>

It looks like a past issue report might already answer their opinion on it actually [Case insensitive filtering · Issue #2145 · duplicati/duplicati · GitHub](https://github.com/duplicati/duplicati/issues/2145)

Also according to that

> `(?i)` case insensitive

But I do not see if that’s possible with default\_compressed\_extensions.txt. When I looked at it, it wasn’t with that intent. If it doesn’t (and offhand without looking at it again I would say it doesn’t) then maybe that might be an issue to create.

But, also if it works with the filters inside Duplicati which I believe its for then could just go that way instead.

They might be a bit iffy or stubborn about it. I can see them based on the linked issue just closing it but there’s a chance (I suppose).

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [March 31, 2021, 1:33am UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/5 "2021-03-31T01:33:54Z")

</div>

> [@Xavron](#):
>
> But I do not see if that’s possible with default\_compressed\_extensions.txt.

If it is, then it’s probably the right solution!

---

<div class="post-metadata">

### Author: ![warwickmm](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/w/5e9695/32.png) [@warwickmm](https://forum.duplicati.com/u/warwickmm)
#### Post date: [March 31, 2021, 2:29am UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/6 "2021-03-31T02:29:49Z")

</div>

It might be as simple as providing a case-insensitive `IEqualityComparer` to the `Dictionary` of hints here:

> <https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Main/Options.cs#L1842>

Currently, we provide a case-sensitive comparer if the filesystem is determined to be case sensitive.

---

<div class="post-metadata">

### Author: ![Xavron](https://forum.duplicati.com/user_avatar/forum.duplicati.com/xavron/32/5539_2.png) [@Xavron](https://forum.duplicati.com/u/Xavron)
#### Post date: [March 31, 2021, 8:57pm UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/9 "2021-03-31T20:57:20Z")

</div>

> [@warwickmm](#):
>
> It might be as simple as providing a case-insensitive `IEqualityComparer` to the `Dictionary` of hints here:

My bad if anyone got my earlier replies that I deleted lol. Looks like IEqualityComparer should also work but the following quick change also works here as a test.

var hints = new Dictionary\<string, CompressionHint\>(StringComparer.OrdinalIgnoreCase);

.MP4 is indeed then treated as “Noncompressible”. Without that, .MP4 is treated as “CompressionHint.Default;”

Also the test shows that a .txt file will return as CompressionHint.Default so it looks to be okay.

Interesting so Library.Utility.Utility.ClientFilenameStringComparer looks like there’s already code to handle this. Just need to change that so a setting can override it. What do you think?

> <https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Utility/Utility.cs#L914>

> <https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Utility/Utility.cs#L836>

---

<div class="post-metadata">

### Author: ![warwickmm](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/w/5e9695/32.png) [@warwickmm](https://forum.duplicati.com/u/warwickmm)
#### Post date: [May 3, 2021, 5:10pm UTC](https://forum.duplicati.com/t/default-compressed-extensions-txt-on-linux-system-is-case-sensitive/12084/10 "2021-05-03T17:10:36Z")

</div>

> <https://github.com/duplicati/duplicati/issues/4493>
>
> \- \[x\] I have searched open and closed issues for duplicates.
> \- \[x\] I have sea…rched the \[forum\](https://forum.duplicati.com) for related topics.
> 
> \----------------------------------------
> 
> \## Environment info
> \- \*\*Duplicati version\*\*: 2.0.6.1
> \- \*\*Operating system\*\*: All
> \- \*\*Backend\*\*: All
> 
> \## Description
> The \[default\_compressed\_extensions.txt\](https://github.com/duplicati/duplicati/blob/beaf03562fdcf4425e962085bdf7175d6a465f49/Duplicati/Library/Main/default\_compressed\_extensions.txt) file contains extensions for files that should not be compressed. However, these are treated in a case-sensitive manner. While filenames in general should be treated this way for case-sensitive filesystems, it seems unlikely for the extension to be case-sensitive when used to indicate the file type.
> 
> We should consider making the compression hints use a case-insensitive match when determining whether to compress a file or not. This can be done by providing \`StringComparer.OrdinalIgnoreCase\` as the \`IEqualityComparer\` to the \`Dictionary\` of hints here:
> 
> https://github.com/duplicati/duplicati/blob/beaf03562fdcf4425e962085bdf7175d6a465f49/Duplicati/Library/Main/Options.cs#L1842
