PHP 8.2.30
Preview: byte-data.js Size: 675 B
/home/byroehnu/.trash/node_modules11/qrcode/lib/core/byte-data.js

const Mode = require('./mode')

function ByteData (data) {
  this.mode = Mode.BYTE
  if (typeof (data) === 'string') {
    this.data = new TextEncoder().encode(data)
  } else {
    this.data = new Uint8Array(data)
  }
}

ByteData.getBitsLength = function getBitsLength (length) {
  return length * 8
}

ByteData.prototype.getLength = function getLength () {
  return this.data.length
}

ByteData.prototype.getBitsLength = function getBitsLength () {
  return ByteData.getBitsLength(this.data.length)
}

ByteData.prototype.write = function (bitBuffer) {
  for (let i = 0, l = this.data.length; i < l; i++) {
    bitBuffer.put(this.data[i], 8)
  }
}

module.exports = ByteData

Directory Contents

Dirs: 0 × Files: 22

Name Size Perms Modified Actions
2.93 KB lrw-r--r-- 2026-02-27 09:44:58
Edit Download
1.78 KB lrw-r--r-- 2026-02-27 09:44:58
Edit Download
719 B lrw-r--r-- 2026-02-27 09:44:58
Edit Download
1.47 KB lrw-r--r-- 2026-02-27 09:44:58
Edit Download
675 B lrw-r--r-- 2026-02-27 09:45:00
Edit Download
3.33 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
893 B lrw-r--r-- 2026-02-27 09:45:00
Edit Download
599 B lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.10 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.85 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.55 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
5.96 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
3.89 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.18 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.55 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
14.77 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.59 KB lrw-r--r-- 2026-02-27 09:45:00
Edit Download
1.06 KB lrw-r--r-- 2026-02-27 09:45:02
Edit Download
9.11 KB lrw-r--r-- 2026-02-27 09:45:02
Edit Download
1.58 KB lrw-r--r-- 2026-02-27 09:45:04
Edit Download
268 B lrw-r--r-- 2026-02-27 09:45:04
Edit Download
4.81 KB lrw-r--r-- 2026-02-27 09:45:04
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).