1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-10 21:33:19 +00:00

Add keepChunkHashes flag to GetSnapshotChunks, allowing reduced memory

This commit is contained in:
Peter Fern
2018-01-20 08:25:35 +11:00
parent 91f02768f9
commit bd5a689b7d
4 changed files with 23 additions and 13 deletions

View File

@@ -357,6 +357,11 @@ func (snapshot *Snapshot) LoadChunks(description []byte) (err error) {
return err
}
// ClearChunks removes loaded chunks from memory
func (snapshot *Snapshot) ClearChunks() {
snapshot.ChunkHashes = nil
}
// LoadLengths construct 'ChunkLengths' from the json description.
func (snapshot *Snapshot) LoadLengths(description []byte) (err error) {
return json.Unmarshal(description, &snapshot.ChunkLengths)