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

Bug or typo? was/blob.h download_to_stream_async definition #352

Open
yxiang92128 opened this issue May 28, 2020 · 3 comments
Open

Bug or typo? was/blob.h download_to_stream_async definition #352

yxiang92128 opened this issue May 28, 2020 · 3 comments

Comments

@yxiang92128
Copy link

It was defined as

    pplx::task<void> download_to_stream_async(concurrency::streams::ostream target, const access_condition& condition, const blob_request_options& options, operation_context context, const pplx::cancellation_token& cancellation_token)
    {
        return download_range_to_stream_async(target, **std::numeric_limits<utility::size64_t>::max(), 0, c**ondition, options, context, cancellation_token);
    }

We are wondering in the above, the offset defined as size64_t::max and the length defined as 0 are flipped?

Just curious and hope somebody would clarify.

Thanks,

Yang

@Jinming-Hu
Copy link
Member

Hi @yxiang92128 , this is not bug or typo. (max,0) means downloading the whole blob.

@yxiang92128
Copy link
Author

@JinmingHu-MSFT
And if the buffer passed in is smaller than the blob size, would it fill up to the size of the buffer or would it grab the whole blob and then copy over the buffer which could be troublesome? I wonder how it works underneath. Thanks.

@Jinming-Hu
Copy link
Member

@yxiang92128 The target concurrency::streams::ostream is a base class, what would happen depends on the implementation of ostream. What kind of stream are you using as download destination?

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

No branches or pull requests

2 participants