nspcc-dev / neofs-sdk-go

Go implementation of NeoFS SDK
Apache License 2.0
5 stars 14 forks source link

Derive sliced payload size from `ReaderSeeker` #545

Open roman-khimov opened 7 months ago

roman-khimov commented 7 months ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when slicer requires a lot of parameters to work.

Describe the solution you'd like

For the reader-based interface we can check if the reader passed implements Seeker as well and if so --- getting the payload size from it is a piece of cake.

Additional context

539, this can't replace it, but can be a nice amendment, buffers and files implement Seek().