Compressed Writer is a writer that is used to draw QR Code image on a very small scale. Since the compressed writer would only use a two-tone palette to generate the image, and automatically compressed in PNG format.
Check codes for more details about compress principle.
option := compressed.Option{
Padding: 4, // padding pixels around the qr code.
BlockSize: 1, // block pixels which represents a bit data.
}
w, err := compressed.New(name, &option)
if err != nil {
panic(err)
}
if err := qrc.Save(w); err != nil {
panic(err)
}