Recognize xz compressed files
This commit is contained in:
parent
9df142bdf6
commit
de42acd190
|
@ -34,7 +34,8 @@ enum Sig48 : uint64
|
||||||
{
|
{
|
||||||
Gif87a = 0x474946383761ul,
|
Gif87a = 0x474946383761ul,
|
||||||
Gif89a = 0x474946383961ul,
|
Gif89a = 0x474946383961ul,
|
||||||
SevenZ = 0x377ABCAF271Cul
|
SevenZ = 0x377ABCAF271Cul,
|
||||||
|
Xz = 0xFD377A585A00ul,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -148,6 +149,8 @@ ContainerFormat parseSignature(const char *buffer, int bufferSize)
|
||||||
return ContainerFormat::Gif89a;
|
return ContainerFormat::Gif89a;
|
||||||
case SevenZ:
|
case SevenZ:
|
||||||
return ContainerFormat::SevenZ;
|
return ContainerFormat::SevenZ;
|
||||||
|
case Xz:
|
||||||
|
return ContainerFormat::Xz;
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -306,6 +309,7 @@ const char *containerFormatAbbreviation(ContainerFormat containerFormat, MediaTy
|
||||||
case ContainerFormat::QuickTime: return "mov";
|
case ContainerFormat::QuickTime: return "mov";
|
||||||
case ContainerFormat::Zip: return "zip";
|
case ContainerFormat::Zip: return "zip";
|
||||||
case ContainerFormat::SevenZ: return "7z";
|
case ContainerFormat::SevenZ: return "7z";
|
||||||
|
case ContainerFormat::Xz: return "xz";
|
||||||
default: return "";
|
default: return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,6 +400,8 @@ const char *containerFormatName(ContainerFormat containerFormat)
|
||||||
return "7z archive";
|
return "7z archive";
|
||||||
case ContainerFormat::QuickTime:
|
case ContainerFormat::QuickTime:
|
||||||
return "Quick Time";
|
return "Quick Time";
|
||||||
|
case ContainerFormat::Xz:
|
||||||
|
return "xz compressed file";
|
||||||
case ContainerFormat::Zip:
|
case ContainerFormat::Zip:
|
||||||
return "ZIP archive";
|
return "ZIP archive";
|
||||||
default:
|
default:
|
||||||
|
@ -486,6 +492,8 @@ const char *containerMimeType(ContainerFormat containerFormat, MediaType mediaTy
|
||||||
return "application/zip";
|
return "application/zip";
|
||||||
case ContainerFormat::SevenZ:
|
case ContainerFormat::SevenZ:
|
||||||
return "application/x-7z-compressed";
|
return "application/x-7z-compressed";
|
||||||
|
case ContainerFormat::Xz:
|
||||||
|
return "application/x-xz";
|
||||||
case ContainerFormat::WindowsBitmap:
|
case ContainerFormat::WindowsBitmap:
|
||||||
return "image/bmp";
|
return "image/bmp";
|
||||||
case ContainerFormat::WindowsIcon:
|
case ContainerFormat::WindowsIcon:
|
||||||
|
|
|
@ -58,7 +58,8 @@ enum class ContainerFormat
|
||||||
Webm, /**< WebM (subset of Matroska) */
|
Webm, /**< WebM (subset of Matroska) */
|
||||||
WindowsBitmap, /**< Microsoft Windows Bitmap */
|
WindowsBitmap, /**< Microsoft Windows Bitmap */
|
||||||
WindowsIcon, /**< Microsoft Windows Icon */
|
WindowsIcon, /**< Microsoft Windows Icon */
|
||||||
Zip /**< ZIP archive */
|
Zip, /**< ZIP archive */
|
||||||
|
Xz /**< xz compressed file */
|
||||||
};
|
};
|
||||||
|
|
||||||
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, int bufferSize);
|
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, int bufferSize);
|
||||||
|
|
Loading…
Reference in New Issue