<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pro-Tek Blog &#187; String Decoder</title>
	<atom:link href="http://www.pro-tekconsulting.com/blog/tag/string-decoder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pro-tekconsulting.com/blog</link>
	<description>For UI developers / UI designers and UI trends</description>
	<lastBuildDate>Thu, 05 Sep 2019 03:59:47 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.34</generator>
	<item>
		<title>STRING DECODER MODULE IN NODE.JS</title>
		<link>http://www.pro-tekconsulting.com/blog/string-decoder-module-in-node-js/</link>
		<comments>http://www.pro-tekconsulting.com/blog/string-decoder-module-in-node-js/#comments</comments>
		<pubDate>Sat, 09 Feb 2019 03:49:56 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[NODE.JS]]></category>
		<category><![CDATA[String Decoder]]></category>

		<guid isPermaLink="false">http://www.pro-tekconsulting.com/blog/?p=2915</guid>
		<description><![CDATA[<p>String Decoder Module in Node.js STRING DECODER: String decoder module in node.js is used to provide an API for decoding buffer object into strings. Also, this decoding is performed in a manner that UTF-8 and UTF-16 characters multibyte coding is preserved. The user might query string module in the following way: var sd = require(&#8216;string_decoder&#8217;).StringDecoder; [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/string-decoder-module-in-node-js/">STRING DECODER MODULE IN NODE.JS</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h4>String Decoder Module in Node.js</h4>
<p><strong>STRING DECODER:</strong></p>
<p>String decoder module in node.js is used to provide an API for decoding buffer object into strings. Also, this decoding is performed in a manner that UTF-8 and UTF-16 characters multibyte coding is preserved. The user might query string module in the following way:</p>
<p>var sd = require(&#8216;string_decoder&#8217;).StringDecoder;</p>
<p><strong>STRING DECODER METHODS:</strong></p>
<p>String decoder class has two methods which are as follows:</p>
<ul>
<li><strong>STRINGDECODER.WRITE(BUFFER):</strong></li>
</ul>
<p>This method is used to return the specified buffer as decoded string. The user passes buffer as the argument in this method. Let’s see an example as given below :</p>
<p>//name of the file : write.js<br />
var stringDecoder = require(&#8216;string_decoder&#8217;).StringDecoder;<br />
var sd = new stringDecoder(&#8216;utf8&#8242;);<br />
var buff = Buffer(&#8216;data to be buffered&#8217;);<br />
//Print the buffered data<br />
console.log(buff);<br />
//Print the decoded buffer<br />
console.log(sd.write(buff));</p>
<p>The user can also run it in the following way too:</p>
<p>&gt;node write.js</p>
<p>&lt;Buffer 64 61 74 61 20 74 6f 20 62 65 20 62 75 66 66 65 72 65 64&gt;</p>
<p>data to be buffered</p>
<ul>
<li><strong>STRINGDECODER.END([BUFFER]): </strong></li>
</ul>
<p>This method is used to return the remaining of the input stored in internal buffer.</p>
<ul>
<li>buffer &lt;Buffer&gt; | &lt;TypedArray&gt; | &lt;DataView&gt; A Buffer, or TypedArray, or DataView containing the bytes to decode.</li>
<li>Returns: &lt;string&gt;</li>
</ul>
<p>It returns any remaining input stored in the internal buffer as a string. Bytes representing incomplete UTF-8 and UTF-16 characters will be swapped with substitution characters appropriate for the character encoding.</p>
<p>If the buffer argument is provided, one final call to stringDecoder.write() is done before returning the remaining input.</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/string-decoder-module-in-node-js/">STRING DECODER MODULE IN NODE.JS</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pro-tekconsulting.com/blog/string-decoder-module-in-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
