New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@qifi/generate

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qifi/generate

Stream Generated QR Codes for data transmission

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

@qifi/generate

npm docs sponsors

Stream Generated QR Codes for data transmission

Sponsors

This project is made possible by all the sponsors supporting my work
You can join them at my sponsors profile:

Usage

import {
  createGeneraterANSI,
  createGeneraterUnicode,
  createGeneraterUnicodeCompact,
  createGeneraterSVG,
  createGeneraterQRCodeArray,
} from '@qifi/generate'

const generaterSvg = createGeneraterSVG(new Uint8Array(file.buffer))

const generaterANSI = createGeneraterANSI(new Uint8Array(file.buffer), {
  // Size of each data slice
  sliceSize: 250,
  // Error correction level
  ecc: 'L',
  // Border width
  border: 2,
})

// display QR Code in terminal
for (const blockQRCode of generaterANSI.fountain()) {
  console.log(blockQRCode)
}

With meta data

If you want to transfer the metadata of the file:

import {
  appendFileHeaderMetaToBuffer,
  readFileHeaderMetaFromBuffer,
} from '@qifi/generate'

const data = new Uint8Array(file.buffer)
const meta = {
  filename: file.name,
  contentType: file.type,
}
const merged = appendFileHeaderMetaToBuffer(data, meta)
const generater = createGeneraterUnicode(merged)

// Send blocks to the receiver
for (const block of generater.fountain()) {
  // display QR Code in terminal
  console.log(blockQRCode)
}

and you can use appendMetaToBuffer and readMetaFromBuffer to add and read custom metadata.

FAQs

Package last updated on 03 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc