How to encode/decode?

Help
Anonymous
2005-05-12
2012-12-07
  • Anonymous - 2005-05-12

    Hi,
    I'm just wondering how to encode or decode something using the LZMA SDK.

    I've had a look at the sourcecode, and can I encode some memory by calling LzmaRamEncode(inBuffer, inSize, outBuffer, outSize, &outSizeProcessed, dictionary, SZ_FILTER_AUTO) ? How does this work?

    Also what does "encoder->Code(inStream, outStream, 0, 0, 0);" do, and how is it different from the function above? Thanks.

     
    • Igor Pavlov

      Igor Pavlov - 2005-05-12

      encoder->Code is main method. It can encode any data/files.

      LzmaRamEncode = BCJ (x86 filter) + LZMA. And it compresses only memory->memory.
      LzmaRamEncode uses encoder->Code.

       
    • Anonymous - 2005-05-12

      Thanks for the reply. Could you please tell me what the BCJ x86 filter is? Does it reduce the compression ratio in any way?

      By the way, I am thinking about using LZMA compression as the basis for a new package format for linux.

       
      • Igor Pavlov

        Igor Pavlov - 2005-05-13

        > Could you please tell me what the BCJ x86 filter is? Does it reduce the compression ratio in any way?

        Yes, if you compress binary files for x86 CPU.

         

Log in to post a comment.