Chunk serialization hook