new Date().getTime() / 1000,
user.getName(),
// version
playlists.getRevision() + 1, // new revision of user playlists
playlists.getItems().size(), // new size of user playlists
playlists.calculateChecksum(), // new checksum of user playlists
playlist.isCollaborative() ? 1 : 0
);
byte[] xmlBytes = xml.getBytes();
ByteBuffer buffer = ByteBuffer.allocate(2 + 16 + 1 + 4 + 4 + 4 + 1 + 1 + xmlBytes.length);