pub async fn into_chunk_map<Store>(self, mut storage: Store) -> ChunkMap<N, T, Meta, Store>
    where
        Store: ChunkWriteStorage<N, T, Meta>,
    {
        // Only do one parallel batch at a time to avoid decompressing the entire map at once.
        for batch_of_compressed_chunks in &self.compressed_chunks.into_iter().chunks(16) {
            for (key, chunk) in
                join_all(batch_of_compressed_chunks.into_iter().map(
                    |(key, compressed_chunk)| async move { (key, compressed_chunk.decompress()) },
                ))
                .await
                .into_iter()
            {
                storage.write(key, chunk);
            }
        }

        self.builder.build_with_write_storage(storage)
    }
/// Returns a new map from the serialized, compressed version. This will decompress each chunk and insert it into the given
/// `storage`.
Returns a new map from the serialized, compressed version. This will decompress each chunk and insert it into the given
`storage`.
Returns a new map from the serialized compressed version . This will decompress each chunk and insert it into the given ` storage ` .
pub async fn into_chunk_map<Store>(self, mut storage: Store) -> ChunkMap<N, T, Meta, Store>
    where
        Store: ChunkWriteStorage<N, T, Meta>,
    {
        // Only do one parallel batch at a time to avoid decompressing the entire map at once.
        for batch_of_compressed_chunks in &self.compressed_chunks.into_iter().chunks(16) {
            for (key, chunk) in
                join_all(batch_of_compressed_chunks.into_iter().map(
                    |(key, compressed_chunk)| async move { (key, compressed_chunk.decompress()) },
                ))
                .await
                .into_iter()
            {
                storage.write(key, chunk);
            }
        }
        self.builder.build_with_write_storage(storage)
    }
pub async fn into_chunk_map < Store > ( self , mut storage : Store ) -> ChunkMap < N , T , Meta , Store > where Store : ChunkWriteStorage < N , T , Meta > , { // Only do one parallel batch at a time to avoid decompressing the entire map at once. for batch_of_compressed_chunks in & self . compressed_chunks . into_iter ( ) . chunks ( 16 ) { for ( key , chunk ) in join_all ( batch_of_compressed_chunks . into_iter ( ) . map ( | ( key , compressed_chunk ) | async move { ( key , compressed_chunk . decompress ( ) ) } , ) ) . await . into_iter ( ) { storage . write ( key , chunk ) ; } } self . builder . build_with_write_storage ( storage ) }
Returns a new map from the serialized, compressed version.
Returns a new map from the serialized compressed version .
self
storage
Store
self
storage
Store