ScrapExplorer - DecompLib.java

Home / lab / decomplab / src Lines: 1 | Size: 760 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1package lab.decomplab.src; 2 3import java.io.*; 4import java.nio.*; 5import java.nio.file.*; 6 7public class DecompLib { 8 9 private final ByteBuffer buf; 10 11 public DecompLib(byte[] data) { 12 buf = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); 13 } 14 15 public byte readUInt8() { 16 return buf.get(); 17 } 18 19 public short readUInt16() { 20 return (short) (buf.getShort() & 0xFFFF); 21 } 22 23 public int readUInt32() { 24 return buf.getInt(); 25 } 26 27 public long readUInt64() { 28 return buf.getLong(); 29 } 30 31 public char readChar() { 32 return (char) buf.get(); 33 } 34 35 public int readInt() { 36 return buf.getInt(); 37 } 38 39 public void skip(int n) { 40 buf.position(buf.position() + n); 41 } 42} 43
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.