summaryrefslogtreecommitdiff
path: root/includes/js/dojox/encoding/bits.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/encoding/bits.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/encoding/bits.js')
-rw-r--r--includes/js/dojox/encoding/bits.js68
1 files changed, 0 insertions, 68 deletions
diff --git a/includes/js/dojox/encoding/bits.js b/includes/js/dojox/encoding/bits.js
deleted file mode 100644
index 8beb167..0000000
--- a/includes/js/dojox/encoding/bits.js
+++ /dev/null
@@ -1,68 +0,0 @@
-if(!dojo._hasResource["dojox.encoding.bits"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.encoding.bits"] = true;
-dojo.provide("dojox.encoding.bits");
-
-dojox.encoding.bits.OutputStream = function(){
- this.reset();
-};
-
-dojo.extend(dojox.encoding.bits.OutputStream, {
- reset: function(){
- this.buffer = [];
- this.accumulator = 0;
- this.available = 8;
- },
- putBits: function(value, width){
- while(width){
- var w = Math.min(width, this.available);
- var v = (w <= width ? value >>> (width - w) : value) << (this.available - w);
- this.accumulator |= v & (255 >>> (8 - this.available));
- this.available -= w;
- if(!this.available){
- this.buffer.push(this.accumulator);
- this.accumulator = 0;
- this.available = 8;
- }
- width -= w;
- }
- },
- getWidth: function(){
- return this.buffer.length * 8 + (8 - this.available);
- },
- getBuffer: function(){
- var b = this.buffer;
- if(this.available < 8){ b.push(this.accumulator & (255 << this.available)); }
- this.reset();
- return b;
- }
-});
-
-dojox.encoding.bits.InputStream = function(buffer, width){
- this.buffer = buffer;
- this.width = width;
- this.bbyte = this.bit = 0;
-};
-
-dojo.extend(dojox.encoding.bits.InputStream, {
- getBits: function(width){
- var r = 0;
- while(width){
- var w = Math.min(width, 8 - this.bit);
- var v = this.buffer[this.bbyte] >>> (8 - this.bit - w);
- r <<= w;
- r |= v & ~(~0 << w);
- this.bit += w;
- if(this.bit == 8){
- ++this.bbyte;
- this.bit = 0;
- }
- width -= w;
- }
- return r;
- },
- getWidth: function(){
- return this.width - this.bbyte * 8 - this.bit;
- }
-});
-
-}