The comparison value that indicates the
end of the reading process. This can be a specific character, number, or
the EOF symbol.
Optionalopt: Partial<ControllerOptions>Optional configuration.
The property decorator function.
You can use this decorator to read relation or primitive until the EOF.
class BinProtocol {
@Until(EOF)
@Uint8
array: number[]
}
This decorator does not accept a function as argument. If you need to use a function to verify an equality based on the currently read value use the While decorator instead.
@Untildecorator reads variable-length array from binary stream until a specified terminating character or magic number is encountered.The main difference between
@Untiland@Countis that@Untilsupports reading data of an undefined length, terminating when a specific character is met. This makes it useful for reading data that ends with a special character or an EOF symbol.