static encode (value) {
    const tableIn =
      'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
    const tableOut =
      '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'

    const utf8Value = decodeURIComponent(encodeURIComponent(value))
    const compressedValue = zlib.deflateSync(utf8Value, { level: 3 })
    const base64Value = compressedValue.toString('base64')
    return maketrans(tableIn, tableOut, base64Value)
  }
Encodes a diagram following PlantUML specs

From https://plantuml.com/text-encoding
1. Encoded in UTF-8
2. Compressed using Deflate or Brotli algorithm
3. Reencoded in ASCII using a transformation close to base64