Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET QuickCompression Deadlock LZMA

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20308 |

    This always “deadlocks” on decompress ??

          byte[] aaa = new byte[1000];
          for (int i=0;i<1000;i++)
          {
            aaa[i] = (byte)i;
          }

          byte[] xxx = Xceed.Compression.QuickCompression.Compress(aaa,Xceed.Compression.CompressionMethod.LZMA,Xceed.Compression.CompressionLevel.None);
          byte[] axxx = Xceed.Compression.QuickCompression.Decompress(yyy,Xceed.Compression.CompressionMethod.LZMA); 

     

    Imported from legacy forums. Posted by Comodo (had 1743 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    In this folowing line:

    byte[] axxx = Xceed.Compression.QuickCompression.Decompress(yyy,Xceed.Compression.CompressionMethod.LZMA); 

    What is yyy?  Shouldnt it be xxx? Because from your code, the compressed stream is xxx.

    try this:

    byte[] axxx = Xceed.Compression.QuickCompression.Decompress(xxx,Xceed.Compression.CompressionMethod.LZMA); 

     

    Imported from legacy forums. Posted by Alain [Xceed] (had 379 views)

    User (Old forums)
    Member
    Post count: 23064

    Sorry, tried some other stuff with yyy (not shown), yes should be xxx. That (xxx) however deadlocks ..

    Imported from legacy forums. Posted by Comodo (had 447 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    I tried the folowing and there was no deadlock:

    static

    void Main( string[] args )

    {

    Xceed.Zip.

    Licenser.LicenseKey = “xxxxxxxxxxxxxxxxxxx” ;

    Xceed.Compression.

    Licenser.LicenseKey= “xxxxxxxxxxxxxxxxxxxxxx” ;

    try

    {

    Byte[] buffer1 = new Byte[ 1000 ];

    Byte[] buffer2 = PopulateBuffer( buffer1 );

    foreach( Byte b in buffer2 )

    {

    Console.WriteLine( b );

    }

     

    byte[] xxx = Xceed.Compression.QuickCompression.Compress( buffer2, Xceed.Compression.CompressionMethod.LZMA, Xceed.Compression.CompressionLevel.None );

     

    byte[] axxx = Xceed.Compression.QuickCompression.Decompress( xxx, Xceed.Compression.CompressionMethod.LZMA );

     

    Console.ReadLine();

    }

    catch(Exception ex)

    {

    throw ex;

    }

    }

     

    public static Byte[] PopulateBuffer( Byte [] buffer)

    {

    for( int i = 0; i < 1000; i++ )

    {

    buffer[ i ] = (

    Byte)i;

    }

    return buffer;

    }

    }

     

    Can you please attach to this thread a sample application that reproduces the deadlock?

    Imported from legacy forums. Posted by Alain [Xceed] (had 319 views)

    User (Old forums)
    Member
    Post count: 23064

    Tried running your app and it causes the same “deadlock”. Tried on XP, Vista and Windows 7.

    I tried the managed LZMA decompressor and it seems to work. Could it have to do with assemblies – Which ones do I need. And license keys – Which goes where ?

          Xceed.Zip.Licenser.LicenseKey = “ZIN41xxxxxx” // Is this right or “SFN41xxx” etc
          Xceed.Compression.Licenser.LicenseKey =  “ZRT4xxxxxx” // Is this right or is it “SFN41xxx” etc

    byte[] xxx = Xceed.Compression.QuickCompression.Compress(aaa,Xceed.Compression.CompressionMethod.LZMA,Xceed.Compression.CompressionLevel.None);
         

          // This works
          ManagedLZMADecompressor mcd = new ManagedLZMADecompressor();
          bool tf = false;
          byte[] bbb = new byte[1000];
          int h = 0;     
          mcd.Decompress(xxx,0,xxx.Length,ref tf,out bbb,out h);

          // This does not work
          byte[] axxx = Xceed.Compression.QuickCompression.Decompress(xxx,Xceed.Compression.CompressionMethod.LZMA);

    Imported from legacy forums. Posted by Comodo (had 1684 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.