encodeRaw can be used to set the output to a raw representation of supplied bytes.
(a []byte)
| 308 | |
| 309 | // encodeRaw can be used to set the output to a raw representation of supplied bytes. |
| 310 | func (b *blockEnc) encodeRaw(a []byte) { |
| 311 | var bh blockHeader |
| 312 | bh.setLast(b.last) |
| 313 | bh.setSize(uint32(len(a))) |
| 314 | bh.setType(blockTypeRaw) |
| 315 | b.output = bh.appendTo(b.output[:0]) |
| 316 | b.output = append(b.output, a...) |
| 317 | if debugEncoder { |
| 318 | println("Adding RAW block, length", len(a), "last:", b.last) |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | // encodeRaw can be used to set the output to a raw representation of supplied bytes. |
| 323 | func (b *blockEnc) encodeRawTo(dst, src []byte) []byte { |