[]
        
(Showing Draft Content)

C1.Zip.ZipEncoding

ZipEncoding Class

Encoding used for entry names and comments. The default encoding is UTF-8.

Inheritance
ZipEncoding
Namespace: C1.Zip
Assembly: C1.Zip.dll
Syntax
public class ZipEncoding
Remarks

This class does not affect compression, it's just used to encode and decode entry names and comments.

The initial version of ZIP format did not support UTF-8. So, some old zip utilities might not recognise this format. Change Encoding property to some other value if you need backward compatibility.

Note that Encoding.Default seems like a logical choice but doesn't really work for international locales. Instead, we need to create an encoding using the current OEMCodePage. That allows accents and international characters to be used in file names (like the zip built into Windows, allows names such as "Åland.txt", "Äiti.txt", "Würth.txt", etc.).

Properties

Name Description
Encoding

Gets or sets Encoding that is used for entry names and comments. The default encoding is UTF-8.