[1] [DFN[[[オクテット列]]]] ([DFN[[[octet sequence]]]], [DFN[[[octet stream]]]]) は、
[[オクテット]]の[[列]]です。
[DFN[[RUBYB[[[バイト列]]]@en[byte sequence]]]]は、[[バイト]]の[[列]]です。
ほとんどの場合、これらは交換可能な用語と考えられています。

;; [2] 厳密には[[オクテット]]と[[バイト]]は異なりますが、
現代においては[[バイト]]は8[[ビット]]と同義とされることがほとんどなので、
[[オクテット列]]と[[バイト列]]は同義になります。

* 仕様書

[REFS[
- [14] [CITE[MIME Sniffing Standard]] ([TIME[2016-03-05 01:29:10 +09:00]] 版) <https://mimesniff.spec.whatwg.org/#byte-sequence>
]REFS]

* 意味

[15] [DFN[[RUBYB[バイト列][byte sequence]]]]は、
1つ[[以上]]の[[バイト]]の[[リスト]]であって、
最初の[[バイト]]の位置と最後の[[バイト]]の位置が曖昧なく識別できるものです。
[SRC[>>14]]

;; [16] この定義だと[[空バイト列]]は[[バイト列]]でないことになります。

* 文字列とオクテット列

[SEE[ [[文字列としてのバイナリーデータ]] ]]

* MIME 型

[4] 他に適当な[[MIME型]]が無い場合、 [CODE(MIME)@en[[[application/octet-stream]]]]
を使うことになっています。

* 関連


[FIG(data)[ [3] [[文字関係]]

:key: [DFN[[CODE[byte:contains]]]]
:desc:
[[バイト列]]を含んでいます。

]FIG]

[FIG(data)[ [6] [[文字関係]]

:key: [DFN[[CODE[byte:containedby]]]]
:desc:
[[バイト列]]に含まれています。

]FIG]


* 歴史

[5] [CITE@en[Character Model for the World Wide Web 1.0: Fundamentals]]
( ([TIME[2005-02-15 14:24:00 +09:00]] 版))
<http://www.w3.org/TR/charmod/#sec-Strings>


[10] [CITE@en[Bug 26499 – Improve the definition of 'byte sequence' to make it less ta... · 6936e73 · whatwg/mimesniff]]
( ([TIME[2014-09-21 13:15:20 +09:00]] 版))
<https://github.com/whatwg/mimesniff/commit/6936e7323b7bbff4f1f047bfa50b06c8a259889b>

[11] [CITE@en[Integrate Fetch into HTML · whatwg/html@7c5555a]]
([TIME[2015-09-18 17:52:46 +09:00]] 版)
<https://github.com/whatwg/html/commit/7c5555a16f2920c02244c10756bb2f1a11e87a22>

[12] [CITE@en[Use backticks around header names and values · whatwg/html@9329c5a]]
([TIME[2015-09-19 13:07:56 +09:00]] 版)
<https://github.com/whatwg/html/commit/9329c5a77980d541bcc07ac9f5a2489ba42df729>

[13] [CITE@en[Replace byte stream with ReadableStream · whatwg/xhr@243bb82]]
([TIME[2016-03-23 17:33:56 +09:00]] 版)
<https://github.com/whatwg/xhr/commit/243bb82b5249e6405705b8eb252dd8bd416bd5f6>

[17] [CITE@en[Editorial: refactor to depend on the Infra Standard]]
([[domenic]]著, [TIME[2016-11-17 07:29:00 +09:00]])
<https://github.com/whatwg/html/commit/4ac633e08c2c9430853fc8322943bc2438ed36a3>

[18] [CITE@en[Editorial: start using the Infra Standard]]
([[annevk]]著, [TIME[2016-11-18 23:44:14 +09:00]])
<https://github.com/whatwg/fetch/commit/9ba4e78e5cb5fc1132f89d7e344cd2c2e1950c67>

[19] [CITE@en[Limit the bytes you can express as string more]]
([[annevk]]著, [TIME[2017-03-17 20:40:17 +09:00]])
<https://github.com/whatwg/infra/commit/b99c4cd6bb8dd958ff66854aceda459baee41636>

[20] [CITE@en[Note how to get a byte sequence out of a string]]
([[annevk]]著, [TIME[2017-03-17 20:15:38 +09:00]])
<https://github.com/whatwg/infra/commit/8ca1cf3f500b030507e884742277e98f4482536c>

[21] [CITE@en[Define length for byte sequences and strings]]
([[annevk]]著, [TIME[2017-03-27 16:59:15 +09:00]])
<https://github.com/whatwg/infra/commit/c484a4fe0d7bdc52b0f17ab99e49eaa9e56e3f56>

[22] [CITE@en[Editorial: let code point and friends be defined by Infra]]
([[annevk]]著, [TIME[2017-03-29 17:47:15 +09:00]])
<https://github.com/whatwg/html/commit/59595d9c2ccadb9332c15048be5d30174532ee70>