MPGA

audio/mpeg

Safe

Magic Bytes

Offset: 0
FF F2

MPGA is a compressed audio file format defined by the Moving Picture Experts Group (MPEG) as part of the MPEG-1 and MPEG-2 standards. This extension serves as a generic identifier for MPEG audio streams, utilized for storing music and voice recordings before the specific MP3 extension became ubiquitous. Although largely superseded by more specific file naming conventions, these files remain functionally identical to standard MPEG audio streams and pose minimal security risks during playback.

Extension

.mpga

MIME Type

audio/mpeg

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .mpga files in Python

Python
def is_mpga(file_path: str) -> bool:
    """Check if file is a valid MPGA by magic bytes."""
    signature = bytes([0xFF, 0xF2])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .mpga files in Node.js

Node.js
function isMPGA(buffer: Buffer): boolean {
  const signature = Buffer.from([0xFF, 0xF2]);
  return buffer.subarray(0, 2).equals(signature);
}
Go
func IsMPGA(data []byte) bool {
    signature := []byte{0xFF, 0xF2}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

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

Related Formats