Esempio n. 1
0
 public static byte[] CompressStringArray(string[] asArray, Encoding aEncoding, string password)
 {
     Compression.CNameStringValue[] cNameStringValueArray = new Compression.CNameStringValue[(int)asArray.Length];
     for (int i = 0; i < (int)asArray.Length; i++)
     {
         Compression.CNameStringValue cNameStringValue = new Compression.CNameStringValue(i.ToString(), asArray[i]);
         cNameStringValueArray[i] = cNameStringValue;
     }
     return(Compression.CompressStringBuffers(cNameStringValueArray, aEncoding, password));
 }
Esempio n. 2
0
 public static Compression.CNameStringValue[] DecompressStringBuffers(byte[] aInputZipBuffer, Encoding aEncoding)
 {
     Compression.CNameBufferValue[] cNameBufferValueArray = Compression.DecompressBinaryBuffers(aInputZipBuffer);
     Compression.CNameStringValue[] cNameStringValueArray = new Compression.CNameStringValue[(int)cNameBufferValueArray.Length];
     for (int i = 0; i < (int)cNameBufferValueArray.Length; i++)
     {
         Compression.CNameStringValue cNameStringValue = new Compression.CNameStringValue(cNameBufferValueArray[i].Name, aEncoding.GetString(cNameBufferValueArray[i].BufferValue));
         cNameStringValueArray[i] = cNameStringValue;
     }
     return(cNameStringValueArray);
 }