GRF Loader
GRF is an archive file format that support lossless data compression used on Ragnarok Online to store game assets. A GRF file may contain one or more files or directories that may have been compressed (deflate) and encrypted (variant of DES).
About
- Only supports GRF version 0x200.
- It's working both on node and browser environments
- Supports DES description.
- Avoid bloating client/server memory (by not loading the whole file into the RAM)
- Does not supports custom encryption
Installation
npm install grf-loader
Basic usage
- Load a grf file on node.js
- Load a grf from the browser
- List all files content
- Extract a file from the GRF
Load a grf file on node.js
;; ;; // Start parsing the grf.await grf.load;
Load a grf from the browser
; ;; // Start parsing the grfawait grf.load;
List all files content
Once the GRF is loaded, it's possible to list all files included inside it
grf.files.forEach;
Extract a file from the GRF
Once the GRF is loaded, it's possible to extract all files you need
; // data is a Uint8Array data, so we transform it into text;console.logcontent;