Note: node. js buffer Buffers

Source: Internet
Author: User
Note: node. js buffer Buffers
  1. The buffer object created before node. JS 6.0 uses the new buffer () constructor to create an object instance, but has large permissions to obtain sensitive information, so it is recommended to create a buffer object using the Buffer.from () interface.
  2. The Buffer instance supports Assii,utf8,utf16le,ucs2-utf16le,base64,latin1,binary-latin1,hex by converting between an explicit character encoding and a normal string.
  3. The writing buffer (buf.write) parameter has string,offset,length,encoding, which returns the size of the write.
  4. Read Buf.tostring ([endoding[, start[, end]]), encoding uses the encoding, the default is the Utf8,start index location, the default is the 0,end end position.

Note: node. js buffer Buffers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.