Skip to content

Commit

Permalink
Add MLA format support
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecot committed Jan 23, 2024
1 parent 6b34f57 commit 82814c5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ identification.
- LArc (LZS)
- LHA
- Mozilla Archive (MAR)
- Multi Layer Archive (MLA)
- PMarc (PMA)
- Roshal Archive (RAR)
- SeqBox (SBX)
Expand Down
Binary file added fixtures/archive/sample.mla
Binary file not shown.
7 changes: 7 additions & 0 deletions src/formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,13 @@ formats! {
extension = "mtv"
kind = Video

format = MultiLayerArchive
name = "Multi Layer Archive"
short_name = "MLA"
media_type = "application/x-mla"
extension = "mla"
kind = Archive

format = MultipleImageNetworkGraphics
name = "Multiple-image Network Graphics"
short_name = "MNG"
Expand Down
3 changes: 3 additions & 0 deletions src/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,9 @@ signatures! {
value = b"\xEF\xBB\xBF<MPD"
value = b"<MPD"

format = MultiLayerArchive
value = b"MLA\x01\x00\x00\x00"

format = ReallySimpleSyndication
value = b"\xEF\xBB\xBF<rss"
value = b"<rss"
Expand Down
6 changes: 6 additions & 0 deletions tests/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ fn test_mozilla_archive() {
assert_eq!(fmt, FileFormat::MozillaArchive);
}

#[test]
fn test_multi_layer_archive() {
let fmt = FileFormat::from_file("fixtures/archive/sample.mla").unwrap();
assert_eq!(fmt, FileFormat::MultiLayerArchive);
}

#[test]
fn test_pmarc() {
let fmt = FileFormat::from_file("fixtures/archive/sample.pma").unwrap();
Expand Down

0 comments on commit 82814c5

Please sign in to comment.