GSLIB

audio/x-psf

Safe

Magic Bytes

Offset: 0
50 53 46

GSLIB is a specific audio library format derived from the Portable Sound Format architecture, developed by the emulation community for Game Boy Advance audio. These files store shared sample data and driver code referenced by MiniGSF files, allowing multiple ripped music tracks to remain small and efficient. Primarily used within specialized audio players and emulators, the format poses minimal security risk as it strictly contains binary audio data and instructions for hardware synthesis.

Extension

.gslib

MIME Type

audio/x-psf

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .gslib files in Python

Python
def is_gslib(file_path: str) -> bool:
    """Check if file is a valid GSLIB by magic bytes."""
    signature = bytes([0x50, 0x53, 0x46])
    with open(file_path, "rb") as f:
        return f.read(3) == signature

How to validate .gslib files in Node.js

Node.js
function isGSLIB(buffer: Buffer): boolean {
  const signature = Buffer.from([0x50, 0x53, 0x46]);
  return buffer.subarray(0, 3).equals(signature);
}
Go
func IsGSLIB(data []byte) bool {
    signature := []byte{0x50, 0x53, 0x46}
    if len(data) < 3 {
        return false
    }
    return bytes.Equal(data[:3], signature)
}

API Endpoint

GET /api/v1/gslib
curl https://filesignature.org/api/v1/gslib

Related Formats