Base64EncodedString Namespace

Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as persisted in an ECDb for properties of binary type.

Variable

Name Description
Base64EncodedString.prefix The prefix prepended to the string identifying it as base-64-encoded.

Function

Name Description
Base64EncodedString.ensurePrefix Ensure that the base-64-encoded string starts with the Base64EncodedString.prefix.
Base64EncodedString.fromUint8Array Encode an array of bytes into a Base64EncodedString.
Base64EncodedString.hasPrefix Returns true if the input starts with Base64EncodedString.prefix indicating it is a well-formed Base64EncodedString.
Base64EncodedString.replacer A function suitable for use with JSON.stringify to serialize a Uint8Array as a Base64EncodedString.
Base64EncodedString.reviver A function suitable for use with JSON.parse to revive a Base64EncodedString into a Uint8Array.
Base64EncodedString.stripPrefix Remove the Base64EncodedString.prefix from the string if present.
Base64EncodedString.toUint8Array Decode a Base64EncodedString into an array of bytes.

Defined in

Base64EncodedString Type alias

Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as required when converting EC properties of binary type to and from JSON.

see TextureProps.data and BRepEntity.DataProps.data for examples of properties of this type.

Base64EncodedString = string

Defined in

Last Updated: 11 June, 2024