compression

package
v0.0.0-...-f8d3efd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

d2 uses compression for compressing large static assets when its built into WASM for d2.js

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecompressBrotli

func DecompressBrotli(compressed []byte) (string, error)

func UnzipEmbeddedSVGImages

func UnzipEmbeddedSVGImages(svg []byte) []byte

imgbundler gets remote images which may be compressed by either gzip or brotli When we load the SVG into headless chromium for PNG screenshots, these compressed images are not detected as proper images that need to be waited on before we screenshot. So prior to loading the SVG into chromium page, we replace these images with their decompressed versions

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL