package com.rafa_99.pkrandom.ctr;
/*----------------------------------------------------------------------------*/
/*-- GARCArchive.java - class for packing/unpacking GARC archives --*/
/*-- --*/
/*-- Code based on "pk3DS", copyright (C) Kaphotics --*/
/*-- --*/
/*-- Ported to Java by UPR-ZX Team under the terms of the GPL: --*/
/*-- --*/
/*-- This program is free software: you can redistribute it and/or modify --*/
/*-- it under the terms of the GNU General Public License as published by --*/
/*-- the Free Software Foundation, either version 3 of the License, or --*/
/*-- (at your option) any later version. --*/
/*-- --*/
/*-- This program is distributed in the hope that it will be useful, --*/
/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
/*-- GNU General Public License for more details. --*/
/*-- --*/
/*-- You should have received a copy of the GNU General Public License --*/
/*-- along with this program. If not, see . --*/
/*----------------------------------------------------------------------------*/
import cuecompressors.BLZCoder;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.*;
public class GARCArchive {
private final int VER_4 = 0x0400;
private final int VER_6 = 0x0600;
private int version;
private final int garcHeaderSize_4 = 0x1C;
private final int garcHeaderSize_6 = 0x24;
private final String garcMagic = "CRAG";
private final String fatoMagic = "OTAF";
private final String fatbMagic = "BTAF";
private final String fimbMagic = "BMIF";
private boolean skipDecompression = true;
public List