webview-bundle 0.0.0-next.55

TBD
Documentation

webview-bundle

Webview Bundle Format (.wvb)

Header

  • Magic Number (8 bytes)
    • Big endian format. Value : 0xf09f8c90 / 0xf09f8e81
    • Represents "🌐🎁" as utf8 encoding.
  • Version (1 bytes)
    • Version field for this webview bundle format.
    • Available versions:
      • version1: 0x01
  • File Descriptors Size (4 bytes)
    • 4 bytes unsigned big endian value (u32)
    • Indicates the size of the File Descriptors field to be read next.
  • File Descriptors
    • This field has dynamic bytes size which is determined by the value of the File Descriptors Size field, and value is big endian format.
    • Format of file descriptors should be HashMap formatted:
      • Key is a path for this file.
      • Value contains offset and length.
  • Header checksum (4 bytes)
    • Header checksum verifies that the full header data has been decoded correctly.
    • The checksum is the result of xxHash-32 algorithm digesting the original (decoded) data as input.

Data

  • Data
    • This field has dynamic bytes size which can be determined each file offset and length from File Descriptors.
    • The content of data is compressed with lz4 block format.

Footer

  • Content Checksum (4 bytes)
    • Content checksum verifies that the full data content has been decoded correctly.
    • The checksum is the result of xxHash-32 algorithm digesting the original (decoded) data as input.