@adguard/agtree
Version:
Tool set for working with adblock filter lists
42 lines (41 loc) • 1.81 kB
TypeScript
/**
* Property map for binary serialization. This helps to reduce the size of the serialized data,
* as it allows us to use a single byte to represent a property.
*
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
*
* @note Only 256 values can be represented this way.
*/
export declare const ModifierNodeMarshallingMap: {
readonly Name: 1;
readonly Value: 2;
readonly Exception: 3;
readonly Start: 4;
readonly End: 5;
};
export type ModifierNodeMarshallingMap = typeof ModifierNodeMarshallingMap[keyof typeof ModifierNodeMarshallingMap];
/**
* Value map for binary serialization. This helps to reduce the size of the serialized data,
* as it allows us to use a single byte to represent frequently used values.
*
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
*
* @note Only 256 values can be represented this way.
*/
export declare const FREQUENT_MODIFIERS_SERIALIZATION_MAP: Map<string, number>;
/**
* Value map for binary serialization. This helps to reduce the size of the serialized data,
* as it allows us to use a single byte to represent frequently used values.
*
* ! IMPORTANT: If you change values here, please update the binary schema version
*
* @note Only 256 values can be represented this way.
*/
export declare const FREQUENT_REDIRECT_VALUES_SERIALIZATION_MAP: Map<string, number>;
/**
* Value map for binary serialization. This helps to reduce the size of the serialized data,
* as it allows us to use a single byte to represent frequently used values.
*
* @note This is a special map which allows us to use different value maps for different modifiers.
*/
export declare const FREQUENT_REDIRECT_MODIFIERS_SERIALIZATION_MAP: Map<string, Map<string, number>>;