Blue Sky ODT
Blue Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.odt4a16330bb1805e4b7d0ab2e523ba9cc7bf0219cf9a9384d97b09dc25459fd5f9Document
LibreOfficeやOpenOfficeで使われるOpenDocumentの文書形式。ZIPコンテナ内にmimetypeやcontent.xmlを含みます。
50 4B 03 04 PK..SIGNATURE = bytes.fromhex("504b0304")
OFFSET = 0
def is_odt(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x50, 0x4b, 0x03, 0x04];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isOdt(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var isodtSignature = []byte{0x50, 0x4b, 0x03, 0x04}
const isodtOffset = 0
func IsOdt(b []byte) bool {
end := isodtOffset + len(isodtSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[isodtOffset:end], isodtSignature)
}const SIGNATURE: &[u8] = &[0x50, 0x4b, 0x03, 0x04];
const OFFSET: usize = 0;
fn is_odt(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x50\x4b\x03\x04";
$offset = 0;
function is_odt(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}OpenDocument Text はデータ交換、インポート/エクスポート、パーサのテスト、検証ワークフローで使われます。エンコーディング・区切り文字・バージョン・コンテナ構造が実装の挙動を変えることがあります。
文書形式はスクリプト・添付・マクロ・外部参照を含むことがあります。プレビューや変換はサンドボックス化し、信頼できないファイルを直接開かないでください。
11 個のサンプルで、先頭バイト判定・パーサのエラー・アップロード上限・ダウンロード挙動をテストできます。
Blue Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.odt4a16330bb1805e4b7d0ab2e523ba9cc7bf0219cf9a9384d97b09dc25459fd5f9Flower Garden ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.odtc0d145f165569327022be523f69a86f1c7659b5ce24cf74fc9ab2bbd004fb2a1Navy Blue Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.odtd7a75ff8c4c99ca8cb73fa3ccfc5f417f55e3c19a4b592142a7bd03425f47e08Nature of the Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.odtf63c31e2a557698508e9bc958f9cbb778ba16461bf26f1c7de1344c7aaec0c4dSky Landscape ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.odtb38aece434d89cc51695c01f9df78d7d927675ea53a1362d38dddcc8214d5526Starry Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.odte7ce9e296b6d2623a53fc00b4e4d34ae2de9bb92a9d03f9f9f19e9523fa5709fBlue Night Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.odt9dbf72b8748dcc99367b785694e1f41a2b5d43ccf8bd3a2825815d4f4fa39695Hibiscus Flower ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.odt00ba59df483126840f6f2566d6a2b1c11556308a0aabbcf6a93c8fe86def8c2aArctic Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.odtb9cb434f38efb29b49d292032ec84f4155404fa87495fa495f3ae9e6fd049833Sunset Rays ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
10-sunset-rays.odt1cda39a6715c4a15409447ff93de167a2d63de3cdb0c47157f2d90dd51491b39NASA Blue Marble ODT is a OpenDocument Text sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.odtafede466a4a8b02370ef80e200fcd16f023a060e792d79631b3b44ce9de0b214OpenDocument Text ファイルはバイトシグネチャ 50 4B 03 04 ("PK..") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。
OpenDocument Text のMIMEタイプは application/vnd.oasis.opendocument.text です。
OpenDocument Text ファイルは .odt 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。