Class GBALZXDecompressor

java.lang.Object
me.hugmanrique.cartage.compression.GBALZXDecompressor
All Implemented Interfaces:
Decompressor

public final class GBALZXDecompressor extends Object implements Decompressor
Implements the LZX decompression algorithm in big-endian mode, used in some Nintendo DS games.
See Also:
CUE Nintendo DS/GBA compressors
  • Method Details

    • get

      public static GBALZXDecompressor get()
      Returns a decompressor instance.
      Returns:
      the decompressor
    • decompress

      public byte[] decompress(Cartridge cartridge) throws DecompressionException
      Description copied from interface: Decompressor
      Decompresses data starting at the current offset of the given cartridge. The offset of the cartridge is incremented by the number of bytes read.
      Specified by:
      decompress in interface Decompressor
      Parameters:
      cartridge - the cartridge
      Returns:
      the decompressed data
      Throws:
      DecompressionException - if an error occurs while attempting decompression