void (@NotNull ByteBuffer buffer, long timestamp) { long relStamp = timestamp - timeBase; if (relStamp < 0 || relStamp >= 0xFF00000000L) { buffer.put((byte)255); buffer.putLong(timestamp); } else { buffer.put((byte)(relStamp >> 32)); buffer.put((byte)(relStamp >> 24)); buffer.put((byte)(relStamp >> 16)); buffer.put((byte)(relStamp >> 8)); buffer.put((byte)(relStamp)); } }