1. AC Question's Avatar
    public static void Decompress(string inFile, string outFile)
    {
    try
    {
    inStream = new FileStream(inFile, FileMode.Open);
    outStream = new FileStream(outFile, FileMode.Create);

    byte[] properties = new byte[5];
    if (inStream.Read(properties, 0, 5) != 5)
    throw (new Exception("Input stream is too short."));

    Compression.LZMA.Decoder decoder = new Compression.LZMA.Decoder();
    decoder.SetDecoderProperties(properties);

    var br = new BinaryReader(inStream, Encoding.UTF8);
    long decompressedSize = br.ReadInt64();
    long compressedSize = br.ReadInt64();
    decoder.Code(inStream, outStream, compressedSize, decompressedSize, null);
    }
    catch (Exception e)
    {
    throw e;
    }
    finally
    {

    inStream.Flush();
    inStream.Close();
    outStream.Flush();
    outStream.Close();
    }
    }
    04-28-2016 09:02 PM

Similar Threads

  1. vr app for 4.0.4 android
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 04-29-2016, 04:24 AM
  2. Replies: 1
    Last Post: 04-29-2016, 04:20 AM
  3. I have the galaxy s6 edge and I have Yahoo Mail on here
    By AC Question in forum Ask a Question
    Replies: 0
    Last Post: 04-28-2016, 08:58 PM
  4. Replies: 0
    Last Post: 04-28-2016, 08:49 PM
  5. Replies: 0
    Last Post: 04-28-2016, 08:46 PM
LINK TO POST COPIED TO CLIPBOARD