A computer-implemented method, comprising: parsing a data stream into a sequence of data chunks; determining whether any of the sequence of data chunks are duplicates of data chunks stored in a chunk container that includes a plurality of data chunks; and storing data chunks of the sequence of data chunks determined to not be duplicates of data chunk stored in the chunk container in a contiguous arrangement and in a same sequence in the chunk container as in the data stream; the method characterized by: generating metadata for each data chunk of the sequence of data chunks, the metadata for a data chunk of the sequence of data chunks including an offset for the data chunk in the data stream, a pointer to a location in the chunk container for the data chunk, and a locality indicator for the data chunk; and generating a stream map that is a data structure that describes a mapping between a structure of the data stream and a structure of the data chunks stored in the chunk container, wherein the stream map includes the metadata for each data chunk of the sequence of data chunks, wherein each of the data chunks stored in the contiguous arrangement have a same locality indicator value being a unique number associated with the data stream; persisting the stream map in a chunk store that includes the chunk container; and in response to a data stream request: determining and receiving the stream map referenced by the optimized file of the data stream request from the chunk store; regenerating the data stream according to the retrieved stream map by using the pointers in the metadata to retrieve each of the data chunks and using data stream offsets in the metadata to arrange the retrieved data chunks in the proper order to re-generate the data stream; and outputting the data stream. parsing a data stream into a sequence of data chunks; determining whether any of the sequence of data chunks are duplicates of data chunks stored in a chunk container that includes a plurality of data chunks; and storing data chunks of the sequence of data chunks determined to not be duplicates of data chunk stored in the chunk container in a contiguous arrangement and in a same sequence in the chunk container as in the data stream; the method characterized by: generating metadata for each data chunk of the sequence of data chunks, the metadata for a data chunk of the sequence of data chunks including an offset for the data chunk in the data stream, a pointer to a location in the chunk container for the data chunk, and a locality indicator for the data chunk; and generating a stream map that is a data structure that describes a mapping between a structure of the data stream and a structure of the data chunks stored in the chunk container, wherein the stream map includes the metadata for each data chunk of the sequence of data chunks, wherein each of the data chunks stored in the contiguous arrangement have a same locality indicator value being a unique number associated with the data stream; persisting the stream map in a chunk store that includes the chunk container; and in response to a data stream request: determining and receiving the stream map referenced by the optimized file of the data stream request from the chunk store; regenerating the data stream according to the retrieved stream map by using the pointers in the metadata to retrieve each of the data chunks and using data stream offsets in the metadata to arrange the retrieved data chunks in the proper order to re-generate the data stream; and outputting the data stream. generating metadata for each data chunk of the sequence of data chunks, the metadata for a data chunk of the sequence of data chunks including an offset for the data chunk in the data stream, a pointer to a location in the chunk container for the data chunk, and a locality indicator for the data chunk; and generating a stream map that is a data structure that describes a mapping between a structure of the data stream and a structure of the data chunks stored in the chunk container, wherein the stream map includes the metadata for each data chunk of the sequence of data chunks, wherein each of the data chunks stored in the contiguous arrangement have a same locality indicator value being a unique number associated with the data stream; persisting the stream map in a chunk store that includes the chunk container; and in response to a data stream request: determining and receiving the stream map referenced by the optimized file of the data stream request from the chunk store; regenerating the data stream according to the retrieved stream map by using the pointers in the metadata to retrieve each of the data chunks and using data stream offsets in the metadata to arrange the retrieved data chunks in the proper order to re-generate the data stream; and outputting the data stream. determining and receiving the stream map referenced by the optimized file of the data stream request from the chunk store; regenerating the data stream according to the retrieved stream map by using the pointers in the metadata to retrieve each of the data chunks and using data stream offsets in the metadata to arrange the retrieved data chunks in the proper order to re-generate the data stream; and outputting the data stream.