prepareJs5Buffer

fun prepareJs5Buffer(archive: Int, group: Int, input: ByteBuf, output: ByteBuf)

Prepares a JS5 buffer to be in a format read to be served to the clients, by splitting the payload up into chunks of 512 bytes, which each have a 0xFF terminator splitting them.

Parameters

archive

the archive id, written as a byte at the start

group

the group id, written as a short at the start

input

the input byte buffer from the cache, with version information stripped off

output

the output byte buffer into which to write the split-up JS5 buffers.