restic/internal
greatroar 5d4568d393 Write sparse files in restorer
This writes files by using (*os.File).Truncate, which resolves to the
truncate system call on Unix.

Compared to the naive loop,

	for _, b := range p {
		if b != 0 {
			return false
		}
	}

the optimized allZero is about 10× faster:

name       old time/op    new time/op     delta
AllZero-8    1.09ms ± 1%     0.09ms ± 1%    -92.10%  (p=0.000 n=10+10)

name       old speed      new speed       delta
AllZero-8  3.84GB/s ± 1%  48.59GB/s ± 1%  +1166.51%  (p=0.000 n=10+10)
2022-09-24 21:18:48 +02:00
..
archiver archiver: reduce memory usage for large files 2022-07-23 14:45:07 +02:00
backend b2: sniff the error that caused init retry loops 2022-08-28 17:46:03 +02:00
bloblru bloblru: Fix comment for New function 2022-03-28 22:25:25 +02:00
cache cache: Just try to open cache entry without calling stat first 2022-08-19 20:59:06 +02:00
checker add option for setting min pack size 2022-08-05 23:47:12 +02:00
crypto crypto: move crypto buffer helpers 2022-07-17 13:42:23 +02:00
debug debug: support roundtripper logging also for release builds 2022-08-05 23:49:39 +02:00
dump repository: extract LoadTree/SaveTree 2022-07-17 13:11:28 +02:00
errors all: Move away from pkg/errors, easy cases 2022-06-14 08:36:38 +02:00
filter filter: deduplicate error handling for pattern validation 2022-09-09 23:12:41 +02:00
fs Add simple test for fs.TempFile on windows 2022-04-09 23:37:58 +02:00
fuse fuse: remove unused context parameter 2022-08-26 20:48:48 +02:00
hashing hashing: Fix up comments 2022-05-11 21:36:10 +02:00
migrations migrate: Report why an migration cannot be applied 2022-09-03 11:49:31 +02:00
options Don't crash if SecretString is uninitialized 2022-07-02 19:44:28 +02:00
pack repository: prevent header overfill 2022-08-05 23:47:12 +02:00
repository repository: cleanup copy connection count check 2022-08-28 11:40:56 +02:00
restic Fix quadratic time complexity of Snapshot.HasPaths 2022-08-30 04:38:17 +03:00
restorer Write sparse files in restorer 2022-09-24 21:18:48 +02:00
selfupdate Refactor file handing for self-update. 2022-04-09 21:40:33 +02:00
test all: Move away from pkg/errors, easy cases 2022-06-14 08:36:38 +02:00
textfile Add more error handling 2021-01-30 20:19:47 +01:00
ui archiver: remove unused fileInfo from progress callback 2022-07-23 14:16:23 +02:00
walker repository: extract LoadTree/SaveTree 2022-07-17 13:11:28 +02:00