今日は、zlibが生成するファイルのフォーマットを調べていました。zlibのファイルフォーマットは、以下に示すRFCにその仕様の全容が書かれています。
この中にはおもしろい記述があります。RFC1950の方では、エンディアンについて以下のような記述があります。
Within a computer, a number may occupy multiple bytes. All multi-byte numbers in the format described here are stored with the MOST-significant byte first (at the lower memory address). (RFC1950 p.3)
一方、RFC1951では、エンディアンについての記述は以下のようになっています。
Within a computer, a number may occupy multiple bytes. All multi-byte numbers in the format described here are stored with the least-significant byte first (at the lower memory address). (RFC1951 p.4)
1つのファイルフォーマットの中に、リトル・エンディアンとビッグ・エンディアンが混在するというおもしろい事に。
…この為に何時間を費やした事か。文章が酷似しているので、全く気付きませんでした。先人の苦労に感謝です。
Stay hungry, Stay foolish. -- Steven Paul Jobs
ポッキーを両端から食べる (スコア:1)
Re:ポッキーを両端から食べる (スコア:1)
Re:ポッキーを両端から食べる (スコア:1)
# とかいう。
BGM♪ Luca Turilli / To Magic Horizons