| 1 | package magic |
| 2 | |
| 3 | import "bytes" |
| 4 | |
| 5 | // Sqlite matches an SQLite database file. |
| 6 | func Sqlite(raw []byte, _ uint32) bool { |
| 7 | return bytes.HasPrefix(raw, []byte{ |
| 8 | 0x53, 0x51, 0x4c, 0x69, 0x74, 0x65, 0x20, 0x66, |
| 9 | 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x33, 0x00, |
| 10 | }) |
| 11 | } |
| 12 | |
| 13 | // MsAccessAce matches Microsoft Access dababase file. |
| 14 | func MsAccessAce(raw []byte, _ uint32) bool { |
| 15 | return offset(raw, []byte("Standard ACE DB"), 4) |
| 16 | } |
| 17 | |
| 18 | // MsAccessMdb matches legacy Microsoft Access database file (JET, 2003 and earlier). |
| 19 | func MsAccessMdb(raw []byte, _ uint32) bool { |
| 20 | return offset(raw, []byte("Standard Jet DB"), 4) |
| 21 | } |