For the complete documentation index, see llms.txt. This page is also available as Markdown.

Base ParseFlashBlock

Get the code example to parse FlashBlock stream provided by BlockRazor

The parsing method for FlashBlock is as follows:

// ParseFlashBlockByte decompresses the brotli-compressed binary data of a flash block.
func ParseFlashBlockByte(data []byte) (string, error) {
	br := brotli.NewReader(bytes.NewReader(data))
	var buf bytes.Buffer
	_, err := buf.ReadFrom(br)
	if err != nil {
		return "", err
	}
	return buf.String(), nil
}

You can access the example here.

Last updated

Was this helpful?