Class LzmaUtils
java.lang.Object
com.github.tommyettinger.textra.utils.LzmaUtils
Simple static utilities to make using
the LZMA compression in libGDX easier.
This simply handles opening and closing compressed and decompressed files without needing to catch IOException.
If something goes wrong, this will throw an unchecked exception, a GdxRuntimeException, with more information than
the original IOException would have.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcompress(com.badlogic.gdx.files.FileHandle input, com.badlogic.gdx.files.FileHandle output) Given aninputFileHandle and anoutputFileHandle that will be overwritten, compresses input usingLzmaand writes the result into output.static voiddecompress(com.badlogic.gdx.files.FileHandle input, com.badlogic.gdx.files.FileHandle output) Given aninputFileHandle compressed withLzma, and anoutputFileHandle that will be overwritten, decompresses input into output.
-
Method Details
-
decompress
public static void decompress(com.badlogic.gdx.files.FileHandle input, com.badlogic.gdx.files.FileHandle output) Given aninputFileHandle compressed withLzma, and anoutputFileHandle that will be overwritten, decompresses input into output.- Parameters:
input- the Lzma-compressed FileHandle to read; typically the file extension ends in ".lzma"output- the FileHandle to write to; will be overwritten
-
compress
public static void compress(com.badlogic.gdx.files.FileHandle input, com.badlogic.gdx.files.FileHandle output) Given aninputFileHandle and anoutputFileHandle that will be overwritten, compresses input usingLzmaand writes the result into output.- Parameters:
input- the FileHandle to read; will not be modifiedoutput- the FileHandle to write Lzma-compressed output to; typically the file extension ends in ".lzma"
-