codeberg.org/go-pdf/fpdf@v0.11.1/wbuf.go (about)

     1  // Copyright ©2021 The go-pdf Authors. All rights reserved.
     2  // Use of this source code is governed by a MIT-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package fpdf
     6  
     7  type wbuffer struct {
     8  	p []byte
     9  	c int
    10  }
    11  
    12  func (w *wbuffer) u8(v uint8) {
    13  	w.p[w.c] = v
    14  	w.c++
    15  }
    16  
    17  func (w *wbuffer) bytes() []byte { return w.p }