diff --git a/js/encoding/DataUtils.js b/js/encoding/DataUtils.js
index 5a9d706..8b2518f 100644
--- a/js/encoding/DataUtils.js
+++ b/js/encoding/DataUtils.js
@@ -326,7 +326,9 @@
 DataUtils.decodeUtf8 = function (utftext) {
 		var string = "";
 		var i = 0;
-		var c = c1 = c2 = 0;
+		var c = 0;
+        var c1 = 0;
+        var c2 = 0;
  
 		while ( i < utftext.length ) {
  
@@ -343,7 +345,7 @@
 			}
 			else {
 				c2 = utftext.charCodeAt(i+1);
-				c3 = utftext.charCodeAt(i+2);
+				var c3 = utftext.charCodeAt(i+2);
 				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
 				i += 3;
 			}
@@ -411,4 +413,33 @@
     }
 
     return true;
-}
\ No newline at end of file
+};
+
+/*
+ * Convert the big endian byte array to an unsigned int.
+ * Don't check for overflow.
+ */
+DataUtils.bigEndianToUnsignedInt = function(bytes) {
+    var result = 0;
+    for (var i = 0; i < bytes.length; ++i) {
+        result <<= 8;
+        result += bytes[i];
+    }
+    return result;
+};
+
+/*
+ * Convert the int value to a new big endian byte array and return.
+ * If value is 0 or negative, return []. 
+ */
+DataUtils.nonNegativeIntToBigEndian = function(value) {
+    var result = [];
+    if (value <= 0)
+        return result;
+    
+    while (value != 0) {
+        result.unshift(value & 0xff);
+        value >>= 8;
+    }
+    return result;
+};
