File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ Archive
131131- **deb ** - ``application/x-deb ``
132132- **ar ** - ``application/x-unix-archive ``
133133- **Z ** - ``application/x-compress ``
134+ - **lzo ** - ``application/x-lzop ``
134135- **lz ** - ``application/x-lzip ``
135136- **lz4 ** - ``application/x-lz4 ``
136137
Original file line number Diff line number Diff line change 8484 archive .Deb (),
8585 archive .Ar (),
8686 archive .Z (),
87+ archive .Lzop (),
8788 archive .Lz (),
8889 archive .Lz4 (),
8990)
Original file line number Diff line number Diff line change @@ -494,6 +494,31 @@ def match(self, buf):
494494 buf [1 ] == 0x9D )))
495495
496496
497+ class Lzop (Type ):
498+ """
499+ Implements the Lzop archive type matcher.
500+ """
501+ MIME = 'application/x-lzop'
502+ EXTENSION = 'lzo'
503+
504+ def __init__ (self ):
505+ super (Lzop , self ).__init__ (
506+ mime = Lzop .MIME ,
507+ extension = Lzop .EXTENSION
508+ )
509+
510+ def match (self , buf ):
511+ return (len (buf ) > 7 and
512+ buf [0 ] == 0x89 and
513+ buf [1 ] == 0x4C and
514+ buf [2 ] == 0x5A and
515+ buf [3 ] == 0x4F and
516+ buf [4 ] == 0x00 and
517+ buf [5 ] == 0x0D and
518+ buf [6 ] == 0x0A and
519+ buf [7 ] == 0x1A )
520+
521+
497522class Lz (Type ):
498523 """
499524 Implements the Lz archive type matcher.
You can’t perform that action at this time.
0 commit comments