Skip to content

Commit 889f638

Browse files
authored
Add support for SPSS data files (#787)
1 parent 093dba0 commit 889f638

5 files changed

Lines changed: 12 additions & 0 deletions

File tree

core.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,14 @@ export class FileTypeParser {
972972
};
973973
}
974974

975+
// SPSS Statistical Data File
976+
if (this.checkString('$FL2') || this.checkString('$FL3')) {
977+
return {
978+
ext: 'sav',
979+
mime: 'application/x-spss-sav',
980+
};
981+
}
982+
975983
// -- 5-byte signatures --
976984

977985
if (this.check([0x4F, 0x54, 0x54, 0x4F, 0x00])) {

fixture/fixture.sav

843 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
"jar",
244244
"jmp",
245245
"rm",
246+
"sav",
246247
"ppsm",
247248
"ppsx",
248249
"tar.gz",

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream.
605605
- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format
606606
- [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file
607607
- [`s3m`](https://wiki.openmpt.org/Manual:_Module_formats#The_ScreamTracker_3_format_.28.s3m.29) - Audio module format: ScreamTracker 3
608+
- [`sav`](https://en.wikipedia.org/wiki/SPSS) - SPSS Statistical Data File
608609
- [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format
609610
- [`skp`](https://en.wikipedia.org/wiki/SketchUp) - SketchUp
610611
- [`spx`](https://en.wikipedia.org/wiki/Ogg) - Audio file

supported.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export const extensions = [
173173
'jar',
174174
'jmp',
175175
'rm',
176+
'sav',
176177
'ppsm',
177178
'ppsx',
178179
'tar.gz',
@@ -352,6 +353,7 @@ export const mimeTypes = [
352353
'application/vnd.ms-powerpoint.presentation.macroenabled.12',
353354
'application/java-archive',
354355
'application/vnd.rn-realmedia',
356+
'application/x-spss-sav',
355357
'application/x-ms-regedit',
356358
'application/x-ft-windows-registry-hive',
357359
'application/x-jmp-data',

0 commit comments

Comments
 (0)