Show / Hide Table of Contents

Class StringCodec

Utility class for resolving the encoding used for reading and writing strings

Inheritance
System.Object
StringCodec
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ICSharpCode.SharpZipLib.Zip
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class StringCodec

Fields

| Improve this Doc View Source

UnicodeZipEncoding

Returns the UTF-8 code page (65001) used for zip entries with unicode flag set

Declaration
public static readonly Encoding UnicodeZipEncoding
Field Value
Type Description
System.Text.Encoding

Properties

| Improve this Doc View Source

CodePage

Code page used for non-unicode strings and legacy zip encoding (if ForceZipLegacyEncoding is set). Default value is SystemDefaultCodePage

Declaration
public int CodePage { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

DefaultZipCryptoEncoding

The default encoding used for ZipCrypto passwords in zip files, set to SystemDefaultEncoding for greatest compability.

Declaration
public static Encoding DefaultZipCryptoEncoding { get; }
Property Value
Type Description
System.Text.Encoding
| Improve this Doc View Source

ForceZipLegacyEncoding

If set, use the encoding set by CodePage for zip entries instead of the defaults

Declaration
public bool ForceZipLegacyEncoding { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

SystemDefaultCodePage

Operating system default codepage, or if it could not be retrieved, the fallback code page IBM 437.

Declaration
public static int SystemDefaultCodePage { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

SystemDefaultEncoding

The system default encoding, based on SystemDefaultCodePage

Declaration
public static Encoding SystemDefaultEncoding { get; }
Property Value
Type Description
System.Text.Encoding
| Improve this Doc View Source

ZipArchiveCommentEncoding

The encoding used for the zip archive comment. Defaults to the encoding for CodePage, since no unicode flag can be set for it in the files.

Declaration
public Encoding ZipArchiveCommentEncoding { get; set; }
Property Value
Type Description
System.Text.Encoding
| Improve this Doc View Source

ZipCryptoEncoding

The encoding used for the ZipCrypto passwords. Defaults to DefaultZipCryptoEncoding.

Declaration
public Encoding ZipCryptoEncoding { get; set; }
Property Value
Type Description
System.Text.Encoding
| Improve this Doc View Source

ZipOutputEncoding

Returns the encoding for an output ZipEntry. Unless overriden by ForceZipLegacyEncoding it returns UnicodeZipEncoding.

Declaration
public Encoding ZipOutputEncoding { get; }
Property Value
Type Description
System.Text.Encoding

Methods

| Improve this Doc View Source

ZipEncoding(Boolean)

Returns UnicodeZipEncoding if unicode is set, otherwise it returns the encoding indicated by CodePage

Declaration
public Encoding ZipEncoding(bool unicode)
Parameters
Type Name Description
System.Boolean unicode
Returns
Type Description
System.Text.Encoding
| Improve this Doc View Source

ZipInputEncoding(GeneralBitFlags)

Returns the appropriate encoding for an input ZipEntry according to flags. If overridden by ForceZipLegacyEncoding, it always returns the encoding indicated by CodePage.

Declaration
public Encoding ZipInputEncoding(GeneralBitFlags flags)
Parameters
Type Name Description
GeneralBitFlags flags
Returns
Type Description
System.Text.Encoding
| Improve this Doc View Source

ZipInputEncoding(Int32)

Returns the appropriate encoding for an input ZipEntry according to flags. If overridden by ForceZipLegacyEncoding, it always returns the encoding indicated by CodePage.

Declaration
public Encoding ZipInputEncoding(int flags)
Parameters
Type Name Description
System.Int32 flags
Returns
Type Description
System.Text.Encoding
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors