Majored / rs-async-zip

An asynchronous ZIP archive reading/writing crate.
MIT License
123 stars 40 forks source link

`tokio::io::AsyncRead`(`Ext`) doesn't seem to be implemented for `async_zip::tokio::read::ZipEntryReader` #98

Closed theRookieCoder closed 4 months ago

theRookieCoder commented 1 year ago

When I use async_zip::tokio::read::seek::ZipFileReader::reader_with_entry() to get a reader, I don't seem to be able to use tokio's AsyncRead or AsyncReadExt on it, despite using the tokio specific module. This is fine for when I only want to read (since I could use the function aliases read_to_<end/string>_checked()), but when I'm using something like copy(), having AsyncRead implemented is required.

anatawa12 commented 9 months ago

I think you can use .compat().

I think rs-async-zip want not to have dependencyship to tokio in core so I'm using compat for most case.

theRookieCoder commented 4 months ago

Can confirm, using .compat() fixes this. But it requires the dependency tokio-util and isn't documented anywhere at the moment.