--!strict --!optimize 2 --!native local Types = require("../Types") local uint16 = require("./uint16") return { write = function(self: Types.Writer, value: string) local len = string.len(value) uint16.write(self, len) buffer.writestring(self._data, self._cursor, value, len) self._cursor += len end, read = function(self: Types.Writer) local len = uint16.read(self) local value = buffer.readstring(self._data, self._cursor, len) self._cursor += len return value end, length = function(value: string) return string.len(value)+2 end, } :: Types.DataTypeInterface