<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] # Buffer(緩沖) *Buffer*(緩沖區)是內存(通常是 RAM )中存儲二進制數據的空間。在 Node.js 中,我們可以通過內置的 `Buffer` 類訪問這些內存空間。緩沖區存儲一個整數序列,類似于 JavaScript 中的[數組](https://www.digitalocean.com/community/tutorials/understanding-arrays-in-javascript)。與數組不同,緩沖區一旦創建就不能更改其大小。 如果您編寫過 Node.js 代碼,那么可能已經不經意使用了緩沖區。例如,當使用 [fs.readFile()](https://nodejs.org/api/fs.html#fs_file_system) 讀取文件時,返回給[回調函數或Promise](https://www.digitalocean.com/community/tutorials/how-to-write-asynchronous-code-in-node-js)的數據是一個緩沖區對象。此外,當 HTTP 請求在 Node.js 中發出時,當客戶端不能一次處理所有流時,它們返回臨時存儲在內部緩沖區中的數據流。 緩沖區在與二進制數據交互時非常有用,通常在較低的網絡層中。它們還使您能夠在 Node.js 中進行細粒度的數據操作。 ``` const buf = new Buffer(255) // 分配 255 字節 buf[0] = 23; // 第一個字節寫入整型數據 23 ``` >[Using buffers in nodejs](https://www.digitalocean.com/community/tutorials/using-buffers-in-node-js)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看