\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4648}{}\doxysubsubsection{The buffer module from $<$a href=\char`\"{}https\+://nodejs.\+org/\char`\"{}$>$node.\+js$<$/a$>$, for the browser.}\label{md_sfcode_node_modules_buffer_README_autotoc_md4648}
\href{https://saucelabs.com/u/buffer}{\texttt{ }}

With \href{http://browserify.org}{\texttt{ browserify}}, simply `require(\textquotesingle{}buffer'){\ttfamily or use the}Buffer\`{} global and you will get this module.

The goal is to provide an API that is 100\% identical to \href{https://nodejs.org/api/buffer.html}{\texttt{ node\textquotesingle{}s Buffer API}}. Read the \href{https://nodejs.org/api/buffer.html}{\texttt{ official docs}} for the full list of properties, instance methods, and class methods that are supported.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4649}{}\doxysection{features}\label{md_sfcode_node_modules_buffer_README_autotoc_md4649}

\begin{DoxyItemize}
\item Manipulate binary data like a boss, in all browsers -- even IE6!
\item Super fast. Backed by Typed Arrays ({\ttfamily Uint8\+Array}/{\ttfamily Array\+Buffer}, not {\ttfamily Object})
\item Extremely small bundle size ({\bfseries{5.\+04\+KB minified + gzipped}}, 35.\+5\+KB with comments)
\item Excellent browser support (IE 6+, Chrome 4+, Firefox 3+, Safari 5.\+1+, Opera 11+, i\+OS, etc.)
\item Preserves Node API exactly, with one minor difference (see below)
\item Square-\/bracket {\ttfamily buf\mbox{[}4\mbox{]}} notation works, even in old browsers like IE6!
\item Does not modify any browser prototypes or put anything on {\ttfamily window}
\item Comprehensive test suite (including all buffer tests from node.\+js core)
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4650}{}\doxysection{install}\label{md_sfcode_node_modules_buffer_README_autotoc_md4650}
To use this module directly (without browserify), install it\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install buffer }

\end{DoxyCode}


This module was previously called {\bfseries{native-\/buffer-\/browserify}}, but please use {\bfseries{buffer}} from now on.

A standalone bundle is available \href{https://wzrd.in/standalone/buffer}{\texttt{ here}}, for non-\/browserify users.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4651}{}\doxysection{usage}\label{md_sfcode_node_modules_buffer_README_autotoc_md4651}
The module\textquotesingle{}s API is identical to node\textquotesingle{}s {\ttfamily Buffer} API. Read the \href{https://nodejs.org/api/buffer.html}{\texttt{ official docs}} for the full list of properties, instance methods, and class methods that are supported.

As mentioned above, `require(\textquotesingle{}buffer'){\ttfamily or use the}Buffer\`{} global with \href{http://browserify.org}{\texttt{ browserify}} and this module will automatically be included in your bundle. Almost any npm module will work in the browser, even if it assumes that the node {\ttfamily Buffer} API will be available.

To depend on this module explicitly (without browserify), require it like this\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var Buffer = require('buffer/').Buffer  // note: the trailing slash is important! }

\end{DoxyCode}


To require this module explicitly, use `require(\textquotesingle{}buffer/'){\ttfamily which tells the node.\+js module lookup algorithm (also used by browserify) to use the $\ast$$\ast$npm module$\ast$$\ast$ named}buffer{\ttfamily  instead of the $\ast$$\ast$node.js core$\ast$$\ast$ module named}buffer\`{}!\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4652}{}\doxysection{how does it work?}\label{md_sfcode_node_modules_buffer_README_autotoc_md4652}
The Buffer constructor returns instances of {\ttfamily Uint8\+Array} that have their prototype changed to {\ttfamily Buffer.\+prototype}. Furthermore, {\ttfamily Buffer} is a subclass of {\ttfamily Uint8\+Array}, so the returned instances will have all the node {\ttfamily Buffer} methods and the {\ttfamily Uint8\+Array} methods. Square bracket notation works as expected -- it returns a single octet.

The {\ttfamily Uint8\+Array} prototype remains unmodified.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4653}{}\doxysection{one minor difference}\label{md_sfcode_node_modules_buffer_README_autotoc_md4653}
\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4654}{}\doxysubsubsection{In old browsers, $<$tt$>$buf.\+slice()$<$/tt$>$ does not modify parent buffer\textquotesingle{}s memory}\label{md_sfcode_node_modules_buffer_README_autotoc_md4654}
If you only support modern browsers (specifically, those with typed array support), then this issue does not affect you. If you support super old browsers, then read on.

In node, the {\ttfamily slice()} method returns a new {\ttfamily Buffer} that shares underlying memory with the original Buffer. When you modify one buffer, you modify the other. \href{https://nodejs.org/api/buffer.html\#buffer_buf_slice_start_end}{\texttt{ Read more.}}

In browsers with typed array support, this {\ttfamily Buffer} implementation supports this behavior. In browsers without typed arrays, an alternate buffer implementation is used that is based on {\ttfamily Object} which has no mechanism to point separate {\ttfamily Buffer}s to the same underlying slab of memory.

You can see which browser versions lack typed array support \href{https://github.com/feross/buffer/blob/master/index.js\#L22-L48}{\texttt{ here}}.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4655}{}\doxysection{tracking the latest node api}\label{md_sfcode_node_modules_buffer_README_autotoc_md4655}
This module tracks the Buffer API in the latest (unstable) version of node.\+js. The Buffer API is considered {\bfseries{stable}} in the \href{https://nodejs.org/docs/latest/api/documentation.html\#documentation_stability_index}{\texttt{ node stability index}}, so it is unlikely that there will ever be breaking changes. Nonetheless, when/if the Buffer API changes in node, this module\textquotesingle{}s API will change accordingly.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4656}{}\doxysection{related packages}\label{md_sfcode_node_modules_buffer_README_autotoc_md4656}

\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/buffer-equals}{\texttt{ {\ttfamily buffer-\/equals}}} -\/ Node.\+js 0.\+12 buffer.\+equals() ponyfill
\item \href{https://www.npmjs.com/package/buffer-reverse}{\texttt{ {\ttfamily buffer-\/reverse}}} -\/ A lite module for reverse-\/operations on buffers
\item \href{https://www.npmjs.com/package/buffer-xor}{\texttt{ {\ttfamily buffer-\/xor}}} -\/ A simple module for bitwise-\/xor on buffers
\item \href{https://www.npmjs.com/package/is-buffer}{\texttt{ {\ttfamily is-\/buffer}}} -\/ Determine if an object is a Buffer without including the whole {\ttfamily Buffer} package
\item \href{https://www.npmjs.com/package/typedarray-to-buffer}{\texttt{ {\ttfamily typedarray-\/to-\/buffer}}} -\/ Convert a typed array to a Buffer without a copy
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4657}{}\doxysection{performance}\label{md_sfcode_node_modules_buffer_README_autotoc_md4657}
See perf tests in {\ttfamily /perf}.

{\ttfamily Browser\+Buffer} is the browser {\ttfamily buffer} module (this repo). {\ttfamily Uint8\+Array} is included as a sanity check (since {\ttfamily Browser\+Buffer} uses {\ttfamily Uint8\+Array} under the hood, {\ttfamily Uint8\+Array} will always be at least a bit faster). Finally, {\ttfamily Node\+Buffer} is the node.\+js buffer module, which is included to compare against.

NOTE\+: Performance has improved since these benchmarks were taken. PR welcoem to update the README.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4658}{}\doxysubsection{Chrome 38}\label{md_sfcode_node_modules_buffer_README_autotoc_md4658}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{5}{|X[-1]}|}
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endfirsthead
\hline
\endfoot
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endhead
Browser\+Buffer\+::bracket-\/notation   &11,457,464 ops/sec   &±0.86\%   &66   &\PBS\centering ✓    \\\cline{1-5}
Uint8\+Array\+::bracket-\/notation   &10,824,332 ops/sec   &±0.74\%   &65   &\PBS\centering \\\cline{1-5}
\end{longtabu}
$\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::concat $\vert$ 450,532 ops/sec $\vert$ ±0.76\% $\vert$ 68 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::concat $\vert$ 1,368,911 ops/sec $\vert$ ±1.50\% $\vert$ 62 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16000) $\vert$ 903,001 ops/sec $\vert$ ±0.96\% $\vert$ 67 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16000) $\vert$ 1,422,441 ops/sec $\vert$ ±1.04\% $\vert$ 66 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16) $\vert$ 11,431,358 ops/sec $\vert$ ±0.46\% $\vert$ 69 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16) $\vert$ 13,944,163 ops/sec $\vert$ ±1.12\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16000) $\vert$ 106,329 ops/sec $\vert$ ±6.70\% $\vert$ 44 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16000) $\vert$ 131,001 ops/sec $\vert$ ±2.85\% $\vert$ 31 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16) $\vert$ 1,554,491 ops/sec $\vert$ ±1.60\% $\vert$ 65 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16) $\vert$ 6,623,930 ops/sec $\vert$ ±1.66\% $\vert$ 65 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Double\+BE $\vert$ 112,830 ops/sec $\vert$ ±0.51\% $\vert$ 69 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Float64 $\vert$ 93,500 ops/sec $\vert$ ±0.57\% $\vert$ 68 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Float\+BE $\vert$ 146,678 ops/sec $\vert$ ±0.95\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Float32 $\vert$ 99,311 ops/sec $\vert$ ±0.41\% $\vert$ 67 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+UInt32\+LE $\vert$ 843,214 ops/sec $\vert$ ±0.70\% $\vert$ 69 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Uint32 $\vert$ 103,024 ops/sec $\vert$ ±0.64\% $\vert$ 67 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::slice $\vert$ 1,013,941 ops/sec $\vert$ ±0.75\% $\vert$ 67 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::subarray $\vert$ 1,903,928 ops/sec $\vert$ ±0.53\% $\vert$ 67 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::write\+Float\+BE $\vert$ 61,387 ops/sec $\vert$ ±0.90\% $\vert$ 67 $\vert$ $\vert$ $\vert$ Data\+View\+::set\+Float32 $\vert$ 141,249 ops/sec $\vert$ ±0.40\% $\vert$ 66 $\vert$ ✓ $\vert$\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4659}{}\doxysubsection{Firefox 33}\label{md_sfcode_node_modules_buffer_README_autotoc_md4659}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{5}{|X[-1]}|}
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endfirsthead
\hline
\endfoot
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endhead
Browser\+Buffer\+::bracket-\/notation   &20,800,421 ops/sec   &±1.84\%   &60   &\PBS\centering \\\cline{1-5}
Uint8\+Array\+::bracket-\/notation   &20,826,235 ops/sec   &±2.02\%   &61   &\PBS\centering ✓   \\\cline{1-5}
\end{longtabu}
$\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::concat $\vert$ 153,076 ops/sec $\vert$ ±2.32\% $\vert$ 61 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::concat $\vert$ 1,255,674 ops/sec $\vert$ ±8.65\% $\vert$ 52 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16000) $\vert$ 1,105,312 ops/sec $\vert$ ±1.16\% $\vert$ 63 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16000) $\vert$ 1,615,911 ops/sec $\vert$ ±0.55\% $\vert$ 66 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16) $\vert$ 16,357,599 ops/sec $\vert$ ±0.73\% $\vert$ 68 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16) $\vert$ 31,436,281 ops/sec $\vert$ ±1.05\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16000) $\vert$ 52,995 ops/sec $\vert$ ±6.01\% $\vert$ 35 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16000) $\vert$ 87,686 ops/sec $\vert$ ±5.68\% $\vert$ 45 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16) $\vert$ 252,031 ops/sec $\vert$ ±1.61\% $\vert$ 66 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16) $\vert$ 8,477,026 ops/sec $\vert$ ±0.49\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Double\+BE $\vert$ 99,871 ops/sec $\vert$ ±0.41\% $\vert$ 69 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Float64 $\vert$ 285,663 ops/sec $\vert$ ±0.70\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Float\+BE $\vert$ 115,540 ops/sec $\vert$ ±0.42\% $\vert$ 69 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Float32 $\vert$ 288,722 ops/sec $\vert$ ±0.82\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+UInt32\+LE $\vert$ 633,926 ops/sec $\vert$ ±1.08\% $\vert$ 67 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Uint32 $\vert$ 294,808 ops/sec $\vert$ ±0.79\% $\vert$ 64 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::slice $\vert$ 349,425 ops/sec $\vert$ ±0.46\% $\vert$ 69 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::subarray $\vert$ 5,965,819 ops/sec $\vert$ ±0.60\% $\vert$ 65 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::write\+Float\+BE $\vert$ 59,980 ops/sec $\vert$ ±0.41\% $\vert$ 67 $\vert$ $\vert$ $\vert$ Data\+View\+::set\+Float32 $\vert$ 317,634 ops/sec $\vert$ ±0.63\% $\vert$ 68 $\vert$ ✓ $\vert$\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4660}{}\doxysubsection{Safari 8}\label{md_sfcode_node_modules_buffer_README_autotoc_md4660}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{5}{|X[-1]}|}
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endfirsthead
\hline
\endfoot
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endhead
Browser\+Buffer\+::bracket-\/notation   &10,279,729 ops/sec   &±2.25\%   &56   &\PBS\centering ✓    \\\cline{1-5}
Uint8\+Array\+::bracket-\/notation   &10,030,767 ops/sec   &±2.23\%   &59   &\PBS\centering \\\cline{1-5}
\end{longtabu}
$\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::concat $\vert$ 144,138 ops/sec $\vert$ ±1.38\% $\vert$ 65 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::concat $\vert$ 4,950,764 ops/sec $\vert$ ±1.70\% $\vert$ 63 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16000) $\vert$ 1,058,548 ops/sec $\vert$ ±1.51\% $\vert$ 64 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16000) $\vert$ 1,409,666 ops/sec $\vert$ ±1.17\% $\vert$ 65 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16) $\vert$ 6,282,529 ops/sec $\vert$ ±1.88\% $\vert$ 58 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16) $\vert$ 11,907,128 ops/sec $\vert$ ±2.87\% $\vert$ 58 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16000) $\vert$ 101,663 ops/sec $\vert$ ±3.89\% $\vert$ 57 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16000) $\vert$ 22,050,818 ops/sec $\vert$ ±6.51\% $\vert$ 46 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16) $\vert$ 176,072 ops/sec $\vert$ ±2.13\% $\vert$ 64 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16) $\vert$ 24,385,731 ops/sec $\vert$ ±5.01\% $\vert$ 51 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Double\+BE $\vert$ 41,341 ops/sec $\vert$ ±1.06\% $\vert$ 67 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Float64 $\vert$ 322,280 ops/sec $\vert$ ±0.84\% $\vert$ 68 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Float\+BE $\vert$ 46,141 ops/sec $\vert$ ±1.06\% $\vert$ 65 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Float32 $\vert$ 337,025 ops/sec $\vert$ ±0.43\% $\vert$ 69 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+UInt32\+LE $\vert$ 151,551 ops/sec $\vert$ ±1.02\% $\vert$ 66 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Uint32 $\vert$ 308,278 ops/sec $\vert$ ±0.94\% $\vert$ 67 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::slice $\vert$ 197,365 ops/sec $\vert$ ±0.95\% $\vert$ 66 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::subarray $\vert$ 9,558,024 ops/sec $\vert$ ±3.08\% $\vert$ 58 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::write\+Float\+BE $\vert$ 17,518 ops/sec $\vert$ ±1.03\% $\vert$ 63 $\vert$ $\vert$ $\vert$ Data\+View\+::set\+Float32 $\vert$ 319,751 ops/sec $\vert$ ±0.48\% $\vert$ 68 $\vert$ ✓ $\vert$\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4661}{}\doxysubsection{Node 0.\+11.\+14}\label{md_sfcode_node_modules_buffer_README_autotoc_md4661}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{5}{|X[-1]}|}
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endfirsthead
\hline
\endfoot
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endhead
Browser\+Buffer\+::bracket-\/notation   &10,489,828 ops/sec   &±3.25\%   &90   &\PBS\centering \\\cline{1-5}
Uint8\+Array\+::bracket-\/notation   &10,534,884 ops/sec   &±0.81\%   &92   &\PBS\centering ✓    \\\cline{1-5}
Node\+Buffer\+::bracket-\/notation   &10,389,910 ops/sec   &±0.97\%   &87   &\PBS\centering \\\cline{1-5}
\end{longtabu}
$\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::concat $\vert$ 487,830 ops/sec $\vert$ ±2.58\% $\vert$ 88 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::concat $\vert$ 1,814,327 ops/sec $\vert$ ±1.28\% $\vert$ 88 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::concat $\vert$ 1,636,523 ops/sec $\vert$ ±1.88\% $\vert$ 73 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16000) $\vert$ 1,073,665 ops/sec $\vert$ ±0.77\% $\vert$ 90 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16000) $\vert$ 1,348,517 ops/sec $\vert$ ±0.84\% $\vert$ 89 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::copy(16000) $\vert$ 1,289,533 ops/sec $\vert$ ±0.82\% $\vert$ 93 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16) $\vert$ 12,782,706 ops/sec $\vert$ ±0.74\% $\vert$ 85 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16) $\vert$ 14,180,427 ops/sec $\vert$ ±0.93\% $\vert$ 92 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::copy(16) $\vert$ 11,083,134 ops/sec $\vert$ ±1.06\% $\vert$ 89 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16000) $\vert$ 141,678 ops/sec $\vert$ ±3.30\% $\vert$ 67 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16000) $\vert$ 161,491 ops/sec $\vert$ ±2.96\% $\vert$ 60 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::new(16000) $\vert$ 292,699 ops/sec $\vert$ ±3.20\% $\vert$ 55 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16) $\vert$ 1,655,466 ops/sec $\vert$ ±2.41\% $\vert$ 82 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16) $\vert$ 14,399,926 ops/sec $\vert$ ±0.91\% $\vert$ 94 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::new(16) $\vert$ 3,894,696 ops/sec $\vert$ ±0.88\% $\vert$ 92 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Double\+BE $\vert$ 109,582 ops/sec $\vert$ ±0.75\% $\vert$ 93 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Float64 $\vert$ 91,235 ops/sec $\vert$ ±0.81\% $\vert$ 90 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::read\+Double\+BE $\vert$ 88,593 ops/sec $\vert$ ±0.96\% $\vert$ 81 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Float\+BE $\vert$ 139,854 ops/sec $\vert$ ±1.03\% $\vert$ 85 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Float32 $\vert$ 98,744 ops/sec $\vert$ ±0.80\% $\vert$ 89 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::read\+Float\+BE $\vert$ 92,769 ops/sec $\vert$ ±0.94\% $\vert$ 93 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+UInt32\+LE $\vert$ 710,861 ops/sec $\vert$ ±0.82\% $\vert$ 92 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Uint32 $\vert$ 117,893 ops/sec $\vert$ ±0.84\% $\vert$ 91 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::read\+UInt32\+LE $\vert$ 851,412 ops/sec $\vert$ ±0.72\% $\vert$ 93 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::slice $\vert$ 1,673,877 ops/sec $\vert$ ±0.73\% $\vert$ 94 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::subarray $\vert$ 6,919,243 ops/sec $\vert$ ±0.67\% $\vert$ 90 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::slice $\vert$ 4,617,604 ops/sec $\vert$ ±0.79\% $\vert$ 93 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::write\+Float\+BE $\vert$ 66,011 ops/sec $\vert$ ±0.75\% $\vert$ 93 $\vert$ $\vert$ $\vert$ Data\+View\+::set\+Float32 $\vert$ 127,760 ops/sec $\vert$ ±0.72\% $\vert$ 93 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::write\+Float\+BE $\vert$ 103,352 ops/sec $\vert$ ±0.83\% $\vert$ 93 $\vert$ $\vert$\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4662}{}\doxysubsection{iojs 1.\+8.\+1}\label{md_sfcode_node_modules_buffer_README_autotoc_md4662}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{5}{|X[-1]}|}
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endfirsthead
\hline
\endfoot
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Method   }&\cellcolor{\tableheadbgcolor}\textbf{ Operations   }&\cellcolor{\tableheadbgcolor}\textbf{ Accuracy   }&\cellcolor{\tableheadbgcolor}\textbf{ Sampled   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Fastest    }\\\cline{1-5}
\endhead
Browser\+Buffer\+::bracket-\/notation   &10,990,488 ops/sec   &±1.11\%   &91   &\PBS\centering \\\cline{1-5}
Uint8\+Array\+::bracket-\/notation   &11,268,757 ops/sec   &±0.65\%   &97   &\PBS\centering \\\cline{1-5}
Node\+Buffer\+::bracket-\/notation   &11,353,260 ops/sec   &±0.83\%   &94   &\PBS\centering ✓   \\\cline{1-5}
\end{longtabu}
$\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::concat $\vert$ 378,954 ops/sec $\vert$ ±0.74\% $\vert$ 94 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::concat $\vert$ 1,358,288 ops/sec $\vert$ ±0.97\% $\vert$ 87 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::concat $\vert$ 1,934,050 ops/sec $\vert$ ±1.11\% $\vert$ 78 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16000) $\vert$ 894,538 ops/sec $\vert$ ±0.56\% $\vert$ 84 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16000) $\vert$ 1,442,656 ops/sec $\vert$ ±0.71\% $\vert$ 96 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::copy(16000) $\vert$ 1,457,898 ops/sec $\vert$ ±0.53\% $\vert$ 92 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::copy(16) $\vert$ 12,870,457 ops/sec $\vert$ ±0.67\% $\vert$ 95 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::copy(16) $\vert$ 16,643,989 ops/sec $\vert$ ±0.61\% $\vert$ 93 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::copy(16) $\vert$ 14,885,848 ops/sec $\vert$ ±0.74\% $\vert$ 94 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16000) $\vert$ 109,264 ops/sec $\vert$ ±4.21\% $\vert$ 63 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16000) $\vert$ 138,916 ops/sec $\vert$ ±1.87\% $\vert$ 61 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::new(16000) $\vert$ 281,449 ops/sec $\vert$ ±3.58\% $\vert$ 51 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::new(16) $\vert$ 1,362,935 ops/sec $\vert$ ±0.56\% $\vert$ 99 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::new(16) $\vert$ 6,193,090 ops/sec $\vert$ ±0.64\% $\vert$ 95 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::new(16) $\vert$ 4,745,425 ops/sec $\vert$ ±1.56\% $\vert$ 90 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Double\+BE $\vert$ 118,127 ops/sec $\vert$ ±0.59\% $\vert$ 93 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Float64 $\vert$ 107,332 ops/sec $\vert$ ±0.65\% $\vert$ 91 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::read\+Double\+BE $\vert$ 116,274 ops/sec $\vert$ ±0.94\% $\vert$ 95 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+Float\+BE $\vert$ 150,326 ops/sec $\vert$ ±0.58\% $\vert$ 95 $\vert$ ✓ $\vert$ $\vert$ Data\+View\+::get\+Float32 $\vert$ 110,541 ops/sec $\vert$ ±0.57\% $\vert$ 98 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::read\+Float\+BE $\vert$ 121,599 ops/sec $\vert$ ±0.60\% $\vert$ 87 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::read\+UInt32\+LE $\vert$ 814,147 ops/sec $\vert$ ±0.62\% $\vert$ 93 $\vert$ $\vert$ $\vert$ Data\+View\+::get\+Uint32 $\vert$ 137,592 ops/sec $\vert$ ±0.64\% $\vert$ 90 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::read\+UInt32\+LE $\vert$ 931,650 ops/sec $\vert$ ±0.71\% $\vert$ 96 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::slice $\vert$ 878,590 ops/sec $\vert$ ±0.68\% $\vert$ 93 $\vert$ $\vert$ $\vert$ Uint8\+Array\+::subarray $\vert$ 2,843,308 ops/sec $\vert$ ±1.02\% $\vert$ 90 $\vert$ $\vert$ $\vert$ Node\+Buffer\+::slice $\vert$ 4,998,316 ops/sec $\vert$ ±0.68\% $\vert$ 90 $\vert$ ✓ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ Browser\+Buffer\+::write\+Float\+BE $\vert$ 65,927 ops/sec $\vert$ ±0.74\% $\vert$ 93 $\vert$ $\vert$ $\vert$ Data\+View\+::set\+Float32 $\vert$ 139,823 ops/sec $\vert$ ±0.97\% $\vert$ 89 $\vert$ ✓ $\vert$ $\vert$ Node\+Buffer\+::write\+Float\+BE $\vert$ 135,763 ops/sec $\vert$ ±0.65\% $\vert$ 96 $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$ $\vert$\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4663}{}\doxysection{Testing the project}\label{md_sfcode_node_modules_buffer_README_autotoc_md4663}
First, install the project\+: \begin{DoxyVerb}npm install
\end{DoxyVerb}
 Then, to run tests in Node.\+js, run\+: \begin{DoxyVerb}npm run test-node
\end{DoxyVerb}
 To test locally in a browser, you can run\+: \begin{DoxyVerb}npm run test-browser-local
\end{DoxyVerb}
 This will print out a URL that you can then open in a browser to run the tests, using \href{https://github.com/defunctzombie/zuul}{\texttt{ Zuul}}.

To run automated browser tests using Saucelabs, ensure that your {\ttfamily SAUCE\+\_\+\+USERNAME} and {\ttfamily SAUCE\+\_\+\+ACCESS\+\_\+\+KEY} environment variables are set, then run\+: \begin{DoxyVerb}npm test
\end{DoxyVerb}
 This is what\textquotesingle{}s run in Travis, to check against various browsers. The list of browsers is kept in the {\ttfamily .zuul.\+yml} file.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4664}{}\doxysection{Java\+Script Standard Style}\label{md_sfcode_node_modules_buffer_README_autotoc_md4664}
This module uses \href{https://github.com/feross/standard}{\texttt{ Java\+Script Standard Style}}.

\href{https://github.com/feross/standard}{\texttt{ }}

To test that the code conforms to the style, {\ttfamily npm install} and run\+: \begin{DoxyVerb}./node_modules/.bin/standard
\end{DoxyVerb}
 \hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4665}{}\doxysection{credit}\label{md_sfcode_node_modules_buffer_README_autotoc_md4665}
This was originally forked from \href{https://github.com/toots/buffer-browserify}{\texttt{ buffer-\/browserify}}.\hypertarget{md_sfcode_node_modules_buffer_README_autotoc_md4666}{}\doxysection{license}\label{md_sfcode_node_modules_buffer_README_autotoc_md4666}
MIT. Copyright (C) \href{http://feross.org}{\texttt{ Feross Aboukhadijeh}}, and other contributors. Originally forked from an MIT-\/licensed module by Romain Beauxis. 