         }
         COMPILE::JS
         {
-            var view:Int8Array;
-            
-            view = new Int8Array(ba, _position, 1);
+            var view:Uint8Array;
+            
+            view = new Uint8Array(ba, _position, 1);
             _position++;
             return view[0];
         }

        }
        COMPILE::JS
        {
            var view:Int8Array;
            
            growBuffer(1);
            
            view = new Int8Array(ba, _position, 1);
            view[0] = byte;
            _position++;
        }

            {
                n = ba.byteLength;
                newBuffer = new ArrayBuffer(n + extra);
                newView = new Uint8Array(newBuffer, 0, n);
                view = new Uint8Array(ba, 0, n);
                for (i = 0; i < n; i++)
                {
                    newView[i] = view[i];
