You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
2.9 KiB
1 line
2.9 KiB
2 years ago
|
{"ast":null,"code":"function QRBitBuffer() {\n this.buffer = new Array();\n this.length = 0;\n}\n\nQRBitBuffer.prototype = {\n get: function (index) {\n var bufIndex = Math.floor(index / 8);\n return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) == 1;\n },\n put: function (num, length) {\n for (var i = 0; i < length; i++) {\n this.putBit((num >>> length - i - 1 & 1) == 1);\n }\n },\n getLengthInBits: function () {\n return this.length;\n },\n putBit: function (bit) {\n var bufIndex = Math.floor(this.length / 8);\n\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0);\n }\n\n if (bit) {\n this.buffer[bufIndex] |= 0x80 >>> this.length % 8;\n }\n\n this.length++;\n }\n};\nmodule.exports = QRBitBuffer;","map":{"version":3,"names":["QRBitBuffer","buffer","Array","length","prototype","get","index","bufIndex","Math","floor","put","num","i","putBit","getLengthInBits","bit","push","module","exports"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/qr.js/lib/BitBuffer.js"],"sourcesContent":["function QRBitBuffer() {\n\tthis.buffer = new Array();\n\tthis.length = 0;\n}\n\nQRBitBuffer.prototype = {\n\n\tget : function(index) {\n\t\tvar bufIndex = Math.floor(index / 8);\n\t\treturn ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;\n\t},\n\t\n\tput : function(num, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tthis.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);\n\t\t}\n\t},\n\t\n\tgetLengthInBits : function() {\n\t\treturn this.length;\n\t},\n\t\n\tputBit : function(bit) {\n\t\n\t\tvar bufIndex = Math.floor(this.length / 8);\n\t\tif (this.buffer.length <= bufIndex) {\n\t\t\tthis.buffer.push(0);\n\t\t}\n\t\n\t\tif (bit) {\n\t\t\tthis.buffer[bufIndex] |= (0x80 >>> (this.length % 8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