chunk: Add functions to map file contents to a chunk