オクテット

バイト、オクテット

[7] バイト (byte) は、処理上1単位とされるビット列です。 現代では1バイトは、8ビットです。オクテット (octet) は、 8ビットビット列です。

[12] バイトは、通常、 0 以上 255 以下のいずれかの整数を表すものと解されます。

仕様書

意味

[15] バイト (byte) は、 8つのビットです >>14

呼称

[8] 本来バイトは8ビットとは限らないため、8ビットを意味する時オクテットと呼ぶのを好む人もいます。 8ビット以外のバイトは最早歴史的・理論上の存在に過ぎないため、 広く普及しているバイトが好ましいとする人もいます。

表記

[16] バイトは、2桁の16進数 (範囲 [ 0x00, 0xFF ]) で表現されます >>14

[30] 歴史的には十進数表記や八進数表記もよく用いられていましたが、 現在ではあまり用いられなくなっています。

[31] 文字列を構成するバイトの場合は、ビット組合せの表記を使うのが正式とされていました。

分類

[19]

接頭辞

[3] バイト単位接頭辞

文字化されたバイト

[10] 文字の世界でバイトを表す

関連

[20] バイトを、バイト列オクテット列といいます。

[21] バイトを表すことを意図した C データ型として char があります。

[22] アルバイトとは無関係です。

歴史

[1]

JIS X 0211‐1994 4.2.10 バイト (byte)
一つの単位として取り扱うビット列。

[5]

4.2 バイト (byte)
一つの単位として操作するビット列。 各ビットは、0又は1のをもつ。 JIS X 0202:1998 4.

[6]

オクテット (octet)
1単位として取り扱う8ビット長のビット順序列。 (JIS X 0221‐1:2001 4.27)

[4]

実行環境基本文字集合の任意の要素を保持するために十分な大きさを持つデータ記憶域単位オブジェクトの個々のバイトのアドレスを、 一意に表現できなければならない。 バイトは連続するビットの列からなる。 1バイト中のビット数は、処理系定義とする。 最も重みの小さいビットを下位ビット (low-order bit) と呼び、最も重みの大きいビットを上位ビット (high‐order bit) と呼ぶ。 (JISX3010-1993 3.4)

[18] MIME SniffingEncoding Standard の定義を参照しています。

メモ

[11] Large Disk HOWTO: 単位とサイズ http://www.linux.or.jp/JF/JFdocs/Large-Disk-HOWTO-3.html

[2] 8ビットに相当する単位としてはバイトが有名ですが、バイトの長さは環境に依存するもので、 1 byte := 8bits と定義されているわけではありません。8ビット単位でデータを扱うことは非常に多いことは、1バイト ≒ 8ビットと考えられていることからも皮肉にも明らかですから、不便極まりありません。そこできっちり必ず8ビットをあらわす単位としてオクテットが使い出されました。

[9] こんにちでは依然バイト優位とはいえ、オクテットの知名度も徐々に上がっていますから、どうしてもバイトである必然性の無い限りオクテットに置換えていってよいと思われます。

[13] RFC 1951 - DEFLATE Compressed Data Format Specification version 1.3 ( 版) https://tools.ietf.org/html/rfc1951#section-1

Byte: 8 bits stored or transmitted as a unit (same as an octet). For this specification, a byte is exactly 8 bits, even on machines which store a character on a number of bits different from eight.

[32] RFC 1950 - ZLIB Compressed Data Format Specification version 3.3 () https://tools.ietf.org/html/rfc1950#page-3

[33] RFC 1952 - GZIP file format specification version 4.3 () https://tools.ietf.org/html/rfc1952#page-3

[34] RFC 7692 - Compression Extensions for WebSocket () https://tools.ietf.org/html/rfc7692#section-7

[23] RFC 959 - File Transfer Protocol ( ()) https://tools.ietf.org/html/rfc959#page-3
byte size
There are two byte sizes of interest in FTP: the logical byte size of the file, and the transfer byte size used for the transmission of the data. The transfer byte size is always 8 bits. The transfer byte size is not necessarily the byte size in which data is to be stored in a system, nor the logical byte size for interpretation of the structure of the data.

[24] Editorial: start using the Infra Standard (annevk著, ) https://github.com/whatwg/encoding/commit/a26f76889bf393999e9caad84a3647ab09c39e09

[25] Editorial: start using the Infra Standard (annevk著, ) https://github.com/whatwg/fetch/commit/9ba4e78e5cb5fc1132f89d7e344cd2c2e1950c67

[26] Improve representation guidelines for bytes and code points (annevk著, ) https://github.com/whatwg/infra/commit/543b2c48b6e1babb50d77e5a3ba5b86be8b56eb9

[27] Editorial: format bytes and code points per Infra (annevk著, ) https://github.com/whatwg/url/commit/91cb2aa532bc2b217e6237d23649aed0d2c566bb

[28] Editorial: let code point and friends be defined by Infra (annevk著, ) https://github.com/whatwg/html/commit/59595d9c2ccadb9332c15048be5d30174532ee70

[29] Deal with the parentheses exception for code point/byte display (annevk著, ) https://github.com/whatwg/infra/commit/a743dbd7f1c9d6200d8eaae127aeeb85a701fb02