Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZXing.PngWriter

An extremely fast barcode generator binding for ZXing.Net

Built for .NET 8+ this library takes advantage of Span<T>, Vector<T> SIMD, and ArrayPool<T> to produce png Streams with minimal overhead.

A QR code for https://example.com is just 417 bytes.

NuGet

Usage

var writer = new PngWriter
{
    Format = BarcodeFormat.QR_CODE
};

using var stream = writer.Write("https://example.com");

With PNG metadata:

var writer = new PngWriter
{
    Format = BarcodeFormat.QR_CODE
};

var textInfo = new TextualInformation
{
    Software = "My App",
    Comment = "Generated QR code"
};

using var stream = writer.Write("https://example.com", textInfo);

Performance

Generates up to ~8,000 QR codes per second on a single thread (120–580 μs depending on content size).

Recent optimizations (cross-platform SIMD, removal of reflection, built-in compression and hashing) improved throughput by 10–66% and reduced allocations by 6–57% compared to v0.3.

About

An extremely fast barcode generator binding for ZXing.Net

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages