scripts
This commit is contained in:
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace ICSharpCode.SharpZipLib.Zip
|
||||
{
|
||||
// Token: 0x02000054 RID: 84
|
||||
public sealed class ZipConstants
|
||||
{
|
||||
// Token: 0x170000A9 RID: 169
|
||||
// (get) Token: 0x06000324 RID: 804 RVA: 0x000114C4 File Offset: 0x000104C4
|
||||
// (set) Token: 0x06000325 RID: 805 RVA: 0x000114CB File Offset: 0x000104CB
|
||||
public static int DefaultCodePage
|
||||
{
|
||||
get
|
||||
{
|
||||
return ZipConstants.defaultCodePage;
|
||||
}
|
||||
set
|
||||
{
|
||||
ZipConstants.defaultCodePage = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000326 RID: 806 RVA: 0x000114D3 File Offset: 0x000104D3
|
||||
public static string ConvertToString(byte[] data, int count)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return Encoding.GetEncoding(ZipConstants.DefaultCodePage).GetString(data, 0, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000327 RID: 807 RVA: 0x000114F0 File Offset: 0x000104F0
|
||||
public static string ConvertToString(byte[] data)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return ZipConstants.ConvertToString(data, data.Length);
|
||||
}
|
||||
|
||||
// Token: 0x06000328 RID: 808 RVA: 0x00011504 File Offset: 0x00010504
|
||||
public static string ConvertToStringExt(int flags, byte[] data, int count)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
if ((flags & 2048) != 0)
|
||||
{
|
||||
return Encoding.UTF8.GetString(data, 0, count);
|
||||
}
|
||||
return ZipConstants.ConvertToString(data, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000329 RID: 809 RVA: 0x0001152D File Offset: 0x0001052D
|
||||
public static string ConvertToStringExt(int flags, byte[] data)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
if ((flags & 2048) != 0)
|
||||
{
|
||||
return Encoding.UTF8.GetString(data, 0, data.Length);
|
||||
}
|
||||
return ZipConstants.ConvertToString(data, data.Length);
|
||||
}
|
||||
|
||||
// Token: 0x0600032A RID: 810 RVA: 0x0001155A File Offset: 0x0001055A
|
||||
public static byte[] ConvertToArray(string str)
|
||||
{
|
||||
if (str == null)
|
||||
{
|
||||
return new byte[0];
|
||||
}
|
||||
return Encoding.GetEncoding(ZipConstants.DefaultCodePage).GetBytes(str);
|
||||
}
|
||||
|
||||
// Token: 0x0600032B RID: 811 RVA: 0x00011576 File Offset: 0x00010576
|
||||
public static byte[] ConvertToArray(int flags, string str)
|
||||
{
|
||||
if (str == null)
|
||||
{
|
||||
return new byte[0];
|
||||
}
|
||||
if ((flags & 2048) != 0)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(str);
|
||||
}
|
||||
return ZipConstants.ConvertToArray(str);
|
||||
}
|
||||
|
||||
// Token: 0x0600032C RID: 812 RVA: 0x0001159D File Offset: 0x0001059D
|
||||
private ZipConstants()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400024C RID: 588
|
||||
public const int VersionMadeBy = 51;
|
||||
|
||||
// Token: 0x0400024D RID: 589
|
||||
[Obsolete("Use VersionMadeBy instead")]
|
||||
public const int VERSION_MADE_BY = 51;
|
||||
|
||||
// Token: 0x0400024E RID: 590
|
||||
public const int VersionStrongEncryption = 50;
|
||||
|
||||
// Token: 0x0400024F RID: 591
|
||||
[Obsolete("Use VersionStrongEncryption instead")]
|
||||
public const int VERSION_STRONG_ENCRYPTION = 50;
|
||||
|
||||
// Token: 0x04000250 RID: 592
|
||||
public const int VERSION_AES = 51;
|
||||
|
||||
// Token: 0x04000251 RID: 593
|
||||
public const int VersionZip64 = 45;
|
||||
|
||||
// Token: 0x04000252 RID: 594
|
||||
public const int LocalHeaderBaseSize = 30;
|
||||
|
||||
// Token: 0x04000253 RID: 595
|
||||
[Obsolete("Use LocalHeaderBaseSize instead")]
|
||||
public const int LOCHDR = 30;
|
||||
|
||||
// Token: 0x04000254 RID: 596
|
||||
public const int Zip64DataDescriptorSize = 24;
|
||||
|
||||
// Token: 0x04000255 RID: 597
|
||||
public const int DataDescriptorSize = 16;
|
||||
|
||||
// Token: 0x04000256 RID: 598
|
||||
[Obsolete("Use DataDescriptorSize instead")]
|
||||
public const int EXTHDR = 16;
|
||||
|
||||
// Token: 0x04000257 RID: 599
|
||||
public const int CentralHeaderBaseSize = 46;
|
||||
|
||||
// Token: 0x04000258 RID: 600
|
||||
[Obsolete("Use CentralHeaderBaseSize instead")]
|
||||
public const int CENHDR = 46;
|
||||
|
||||
// Token: 0x04000259 RID: 601
|
||||
public const int EndOfCentralRecordBaseSize = 22;
|
||||
|
||||
// Token: 0x0400025A RID: 602
|
||||
[Obsolete("Use EndOfCentralRecordBaseSize instead")]
|
||||
public const int ENDHDR = 22;
|
||||
|
||||
// Token: 0x0400025B RID: 603
|
||||
public const int CryptoHeaderSize = 12;
|
||||
|
||||
// Token: 0x0400025C RID: 604
|
||||
[Obsolete("Use CryptoHeaderSize instead")]
|
||||
public const int CRYPTO_HEADER_SIZE = 12;
|
||||
|
||||
// Token: 0x0400025D RID: 605
|
||||
public const int LocalHeaderSignature = 67324752;
|
||||
|
||||
// Token: 0x0400025E RID: 606
|
||||
[Obsolete("Use LocalHeaderSignature instead")]
|
||||
public const int LOCSIG = 67324752;
|
||||
|
||||
// Token: 0x0400025F RID: 607
|
||||
public const int SpanningSignature = 134695760;
|
||||
|
||||
// Token: 0x04000260 RID: 608
|
||||
[Obsolete("Use SpanningSignature instead")]
|
||||
public const int SPANNINGSIG = 134695760;
|
||||
|
||||
// Token: 0x04000261 RID: 609
|
||||
public const int SpanningTempSignature = 808471376;
|
||||
|
||||
// Token: 0x04000262 RID: 610
|
||||
[Obsolete("Use SpanningTempSignature instead")]
|
||||
public const int SPANTEMPSIG = 808471376;
|
||||
|
||||
// Token: 0x04000263 RID: 611
|
||||
public const int DataDescriptorSignature = 134695760;
|
||||
|
||||
// Token: 0x04000264 RID: 612
|
||||
[Obsolete("Use DataDescriptorSignature instead")]
|
||||
public const int EXTSIG = 134695760;
|
||||
|
||||
// Token: 0x04000265 RID: 613
|
||||
[Obsolete("Use CentralHeaderSignature instead")]
|
||||
public const int CENSIG = 33639248;
|
||||
|
||||
// Token: 0x04000266 RID: 614
|
||||
public const int CentralHeaderSignature = 33639248;
|
||||
|
||||
// Token: 0x04000267 RID: 615
|
||||
public const int Zip64CentralFileHeaderSignature = 101075792;
|
||||
|
||||
// Token: 0x04000268 RID: 616
|
||||
[Obsolete("Use Zip64CentralFileHeaderSignature instead")]
|
||||
public const int CENSIG64 = 101075792;
|
||||
|
||||
// Token: 0x04000269 RID: 617
|
||||
public const int Zip64CentralDirLocatorSignature = 117853008;
|
||||
|
||||
// Token: 0x0400026A RID: 618
|
||||
public const int ArchiveExtraDataSignature = 117853008;
|
||||
|
||||
// Token: 0x0400026B RID: 619
|
||||
public const int CentralHeaderDigitalSignature = 84233040;
|
||||
|
||||
// Token: 0x0400026C RID: 620
|
||||
[Obsolete("Use CentralHeaderDigitalSignaure instead")]
|
||||
public const int CENDIGITALSIG = 84233040;
|
||||
|
||||
// Token: 0x0400026D RID: 621
|
||||
public const int EndOfCentralDirectorySignature = 101010256;
|
||||
|
||||
// Token: 0x0400026E RID: 622
|
||||
[Obsolete("Use EndOfCentralDirectorySignature instead")]
|
||||
public const int ENDSIG = 101010256;
|
||||
|
||||
// Token: 0x0400026F RID: 623
|
||||
private static int defaultCodePage = Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user