Class GBALZSSDecompressor

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

public final class GBALZSSDecompressor extends Object implements Decompressor
Implements the LZ77UnCompRead algorithm, present in the BIOS of the GBA and Nintendo DS.
See Also:
GBATEK
  • Method Details

    • get

      public static GBALZSSDecompressor 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