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 void
compress
(com.badlogic.gdx.files.FileHandle input, com.badlogic.gdx.files.FileHandle output) Given aninput
FileHandle and anoutput
FileHandle that will be overwritten, compresses input usingLzma
and writes the result into output.static void
decompress
(com.badlogic.gdx.files.FileHandle input, com.badlogic.gdx.files.FileHandle output) Given aninput
FileHandle compressed withLzma
, and anoutput
FileHandle 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 aninput
FileHandle compressed withLzma
, and anoutput
FileHandle 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 aninput
FileHandle and anoutput
FileHandle that will be overwritten, compresses input usingLzma
and 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"
-