Parameters
The functions take no
context.Context. The download has a fixed 120-second timeout, and the decompressed dataset is capped at 512 MiB. Each dataset’s SHA-256 digest is pinned in the SDK and checked after download and on every cache read, so a tampered file is rejected and downloaded again.
Returns
*SampleDataset:
Errors
ErrUnknownSampleDataset
ErrUnknownSampleDataset
The dataset name is unknown.
ErrSampleDatasetDownload
ErrSampleDatasetDownload
The download returns a non-
200 status. A network failure or timeout returns the underlying error (for example a *url.Error) instead, without this sentinel.ErrSampleDatasetIntegrity
ErrSampleDatasetIntegrity
The file fails its SHA-256 check.
ErrSampleDatasetTooLarge
ErrSampleDatasetTooLarge
The decompressed dataset exceeds 512 MiB.
errors.Is.