Name
LzmaCompress.exe – encode or decode a file by LZMA compress/decompress algorithm
Synopsis
LzmaCompress [-v | -q | --f86 | --debug <Level>] -e|-d [-o <OutputFile>] <inputFile>
LzmaCompress –h
LzmaCompress --version
Description
The LzmaCompress tool is used to encode or decode files with LZMA encode or decode algorithm. When “-e” option is specified in the command line the tool will encode the input file with LZMA encode algorithm; when “-d” option is specified in the command line the tool will decode the input file with LZMA decode algorithm.  “—f86" option is specified to enable converter for x86 code that can improve the compress ratio for IA32 or X64 PE image. When decoding file, this tool performs some rudimentary checking on the input files to verify they are compressed by LZMA algorithm. These checks include: 
    The input file header (5 + 8 bytes header); 
    The first 5 bytes is the attribute of compression.  
    The following 8 bytes is original size which is the input file size and it is the decompressed file size. 
While encoding file, this tool does not perform any checking.
Options
If no options are specified, tool prints usage.
-e   Encode the input file, which means to compress the input file
-d   Decode the input file, which means to decompress the input file
-o, --output Filename
      The file containing encoded or decoded content of input file
--f86
      enable converter for x86 code
--version
	Print version and copyright of this program and exit
-v, --verbose
      Enable verbose output with informational messages printed. This is a count value, so specifying –v can be used to increase the verbosity level.
-q, --quiet
	Disable all messages except FATAL ERRORS
--debug [0-9]
	Enable debug messages. Only 0-9 Level is supported.
-h, --help
	Print copyright, version and usage of this program and exit
Status codes returned
0	The action was completed as requested.	
Nonzero	The action failed.	
Example
1. Encode the input file “file.efi” and specify the output file name with “file.lzma”
LzmaCompress –e –o file.lzma file.efi
2. Decode the input file “file.lzma” and specify the output file name with “file.orig”
LzmaCompress –d –o file.orig file.lzma
3. Decode the input file "file.lzma" in the quiet mode and specify the output file name with "file.orig"
LzmaCompress –d -q –o file.orig file.lzma
4. Encode the input file “file.efi” with converter for x86 code and specify the output file name with “file.lzma”
LzmaCompress –e –-f86 –o filex86.lzma filex86.efi
5. Decode the input file “filex86.lzma” with converter for x86 code and specify the output file name with “filex86.orig”
LzmaCompress –d --f86 –o filex86.orig filex86.lzma

Bugs
No known issues.
Report bugs to edk2-devel@lists.01.org
Files
None
See also
LZMA algorithm is in http://www.7-zip.org
License
Based on LZMA Utility 4.65 : Igor Pavlov : Public domain : 2009-02-03

Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.