Going to bowling
This commit is contained in:
parent
7195f1ae8b
commit
875c7494d8
|
@ -9,10 +9,10 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="cf74c012-cc69-4732-ac79-9ddfcbf803ee" name="Changes" comment="start i/o logic, CLI is partial atm">
|
<list default="true" id="cf74c012-cc69-4732-ac79-9ddfcbf803ee" name="Changes" comment="The compiler fucked itself">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/net/screwgravity/vitality4j/standalone.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/screwgravity/vitality4j/standalone.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/net/screwgravity/vitality4j/standalone.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/screwgravity/vitality4j/standalone.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/net/screwgravity/vitality4j/tools.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/screwgravity/vitality4j/tools.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/net/screwgravity/vitality4j/tools.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/screwgravity/vitality4j/tools.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -160,7 +160,15 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1723527352761</updated>
|
<updated>1723527352761</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="10" />
|
<task id="LOCAL-00010" summary="The compiler fucked itself">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1728336100523</created>
|
||||||
|
<option name="number" value="00010" />
|
||||||
|
<option name="presentableId" value="LOCAL-00010" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1728336100523</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="11" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
|
@ -173,6 +181,7 @@
|
||||||
<MESSAGE value="cli args handling WIP" />
|
<MESSAGE value="cli args handling WIP" />
|
||||||
<MESSAGE value="shut up" />
|
<MESSAGE value="shut up" />
|
||||||
<MESSAGE value="start i/o logic, CLI is partial atm" />
|
<MESSAGE value="start i/o logic, CLI is partial atm" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="start i/o logic, CLI is partial atm" />
|
<MESSAGE value="The compiler fucked itself" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="The compiler fucked itself" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -165,6 +165,9 @@ public class standalone {
|
||||||
try {
|
try {
|
||||||
PSARC psarc = new PSARC(new File (targetPath)); // System.getProperty("user.dir") + File.separator +
|
PSARC psarc = new PSARC(new File (targetPath)); // System.getProperty("user.dir") + File.separator +
|
||||||
System.out.println("PSARC version " + psarc.version[0] + "." + psarc.version[1] + "." + psarc.version[2] + "." + psarc.version[3]);
|
System.out.println("PSARC version " + psarc.version[0] + "." + psarc.version[1] + "." + psarc.version[2] + "." + psarc.version[3]);
|
||||||
|
String comp = "nothing";
|
||||||
|
if (psarc.algorithm == CompressionFormats.ZLIB) {comp = "ZLIB";} else if (psarc.algorithm == CompressionFormats.LZMA) {comp = "LZMA";}
|
||||||
|
System.out.println("Compressed with " + comp);
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Error reading file \"" + targetPath + "\".\n" + e.getMessage());
|
System.out.println("Error reading file \"" + targetPath + "\".\n" + e.getMessage());
|
||||||
|
|
|
@ -73,6 +73,7 @@ public class tools {
|
||||||
public PathModes mode = PathModes.RELATIVE;
|
public PathModes mode = PathModes.RELATIVE;
|
||||||
private RandomAccessFile fromDisk = null; // if NULL then file is a new file
|
private RandomAccessFile fromDisk = null; // if NULL then file is a new file
|
||||||
private List<CompressedFile> files = new ArrayList<CompressedFile>();
|
private List<CompressedFile> files = new ArrayList<CompressedFile>();
|
||||||
|
private int toc_length = 0;
|
||||||
|
|
||||||
public PSARC() { // new w/ defaults
|
public PSARC() { // new w/ defaults
|
||||||
// use defaults, do nothing
|
// use defaults, do nothing
|
||||||
|
@ -93,6 +94,18 @@ public class tools {
|
||||||
// ok, it is safe to continue
|
// ok, it is safe to continue
|
||||||
fromDisk.seek(4);
|
fromDisk.seek(4);
|
||||||
fromDisk.read(version);
|
fromDisk.read(version);
|
||||||
|
|
||||||
|
byte[] algorithm_cast = new byte[]{0, 0, 0, 0};
|
||||||
|
byte[] header_zlib = new byte[]{122, 108, 105, 98};
|
||||||
|
byte[] header_lzma = new byte[]{108, 122, 109, 97};
|
||||||
|
fromDisk.read(algorithm_cast);
|
||||||
|
if (Arrays.equals(algorithm_cast, header_zlib)) {algorithm = CompressionFormats.ZLIB;}
|
||||||
|
else if (Arrays.equals(algorithm_cast, header_lzma)) {algorithm = CompressionFormats.LZMA;}
|
||||||
|
else {throw new IncorrectFileTypeException("Unrecognized or unimplemented compression algorithm.");}
|
||||||
|
|
||||||
|
byte[] toc_length_cast = new byte[]{0, 0, 0, 0};
|
||||||
|
fromDisk.read(toc_length_cast);
|
||||||
|
//toc_length = (int)toc_length_cast;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PSARC(CompressionFormats algorithm, byte strength) { // new
|
public PSARC(CompressionFormats algorithm, byte strength) { // new
|
||||||
|
|
Loading…
Reference in New Issue
Block a user