Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-BufferSize 33554432 with -BufferGranularSize 4096 #4

Open
epsitec opened this issue Jan 2, 2024 · 1 comment
Open

-BufferSize 33554432 with -BufferGranularSize 4096 #4

epsitec opened this issue Jan 2, 2024 · 1 comment
Labels

Comments

@epsitec
Copy link

epsitec commented Jan 2, 2024

The PS-ForceCopy script saved me while copying a multi-GB file.

I tried setting following options:

  • -BufferSize 33554432
  • -BufferGranularSize 4096

expecting the copy to go fast until an error is encountered, and then having the suspect part being copied by 4kB increments, yet the copy skipped 32MB of data, which were filled with zeroes, whereas running the script on the same file without these arguments produced only a hole of 4kB.

I suspect that the -BufferGranularSize 4096 option does not work as expected. Or did I miss something?

@DavorJ DavorJ added the bug label Jan 2, 2024
@DavorJ
Copy link
Owner

DavorJ commented Jan 2, 2024

Thank you for reporting the issue. The original idea of BufferSize was to represent the smallest readable chunk.

With addition of BufferGranularSize in #2 the meaning of BufferSize is shifted to BufferGranularSize when it is specified.

I unfortunately didn't test that PR. For now, I would leave BufferGranularSize unspecified (i.e. default: -1): it will be slower, but it should work well.

cc @zootie

PS I should probably replace BufferSize and BufferGranularSize with MinimalReadSize and ReadBuffer in a later version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants