All depends what hashing function you used. If this is sha1, md5sum, or antyhing that is not reversible then you need to create a separate 'map' file that will contain hash and corresponding data. Now, having such map, you can read your file containing hashes, and replace these hashes with the appropriate data read from the map file.
hashing-and-dividing-function:
while ( chunk = get_next_chunk())
{
hash = hashing_function( chunk ) ;
store( hash ) ;
if ( !map.find( hash ))
map[ hash ] = chunk ;
}
map.dump( mapfile ) ;
Restoring:
map.load( mapfile ) ;
while ( hash = get_next_hash())
{
write( map[ hash ]) ;
}