Crypt backend filename encoding

Related github request: Base32768 file name encoding for crypt backend · Issue #5801 · rclone/rclone · GitHub
Related forum post: Base32768 to compress filename length

Crypt overlay now uses base32 to encode the filename resulting in a large overhead

I use a crypt backend with Dropbox, which is semi-case sensitive as well as not supporting the full character set of base32k.

I was hoping to add another option to --crypt-filename-encoding, something like base512 (or base260?) that would:

  • attempt a base32 encoding, and if the encoding length passed a threshold would:
  • encode in base512, using a specifically curated character set supported on many (all?) backends where none of the characters could case-fold into each other. The character set could be different from b32 to prevent confusion

Why base512? Dropbox has the same filename limit that most OS do (260 characters), so this way I would be able to put any file I can have in my filesystem into my crypt rclone (base32 and to a lesser extent base64 wont let me do this, and base32k doesn't work with Dropbox).

The benefit of doing it this way is that people could use it as a drop-in replacement, without having to re-encode filenames.

Would a feature like this be welcomed? I would be happy to implement it.

1 Like

Seems like a really good idea!

1 Like