タグ

binaryに関するizariuo440のブックマーク (3)

  • DataView - JavaScript | MDN

    多バイトの数値形式は、マシンアーキテクチャによってメモリー内での表現が異なります。説明はエンディアンを参照してください。 DataView のアクセサーは、プラットフォームアーキテクチャのエンディアンに関係なくデータにアクセスする方法を明確に制御する手段を提供します。 var littleEndian = (function () { var buffer = new ArrayBuffer(2); new DataView(buffer).setInt16(0, 256, true /* リトルエンディアン */); // Int16Array はプラットフォームのエンディアンを使用する return new Int16Array(buffer)[0] === 256; })(); console.log(littleEndian); // true または false

    DataView - JavaScript | MDN
    izariuo440
    izariuo440 2016/02/11
    エンディアンを意識してバイナリの読み書きができる
  • Uint8ClampedArray - JavaScript | MDN

    Uint8ClampedArray.prototype.buffer Uint8ClampedArray オブジェクトによって参照される ArrayBuffer を返します。構築時に固定され、読み取り専用です。 Uint8ClampedArray.prototype.byteLength Uint8ClampedArray の ArrayBuffer の先頭からの長さを (バイト単位で) 返します。構築時に固定され、読み取り専用です。 Uint8ClampedArray.prototype.byteOffset ArrayBuffer の先頭からの Uint8ClampedArray のオフセットを (バイト単位で) 返します。構築時に固定され、読み取り専用です。 Uint8ClampedArray.prototype.length Uint8ClampedArray オブジェクト内に保持

    Uint8ClampedArray - JavaScript | MDN
    izariuo440
    izariuo440 2016/02/11
    IE10 は未対応
  • Typed arrays - Binary data in the browser  |  Articles  |  web.dev

    Typed arrays - Binary data in the browser Stay organized with collections Save and categorize content based on your preferences. Introduction Typed Arrays are a relatively recent addition to browsers, born out of the need to have an efficient way to handle binary data in WebGL. A Typed Array is a slab of memory with a typed view into it, much like how arrays work in C. Because a Typed Array is bac

    Typed arrays - Binary data in the browser  |  Articles  |  web.dev
    izariuo440
    izariuo440 2012/09/15
    JavaScript でバイナリを扱うことに関する概観
  • 1