clean up and readme edit
This PR offers a cleaner implementation of the new istreambuf constructor introduced in https://github.com/tmaklin/bxzstr/pull/32. We also add a new overloaded ifstream constructor, allowing the simpler syntax
bxz::ifstream input(file, bxz::zstd);
as for ofstream.
Also edit the readme.
Btw, with the new none compression method the old auto_detect parameter for the istreambuf constructor could be dropped completely. Going either for the syntax
istreambuf(std::streambuf * _sbuf_p, Compression _type = none, std::size_t _buff_size = default_buff_size)
or
istreambuf(std::streambuf * _sbuf_p, std::size_t _buff_size = default_buff_size, Compression _type = none)
And with the convention that none means we attempt auto detection.
Let me know if you think this is a good idea and which of the two syntax you would prefer. (Only the latter would give backward compatibility.) I could then prepare a PR.
Thanks again, I need to do a major version bump anyway to fix #23 and #27 so the first one looks better to me. Feel free to make a PR if you like.
~~Can do the PR as discussed once this is merged.~~ See https://github.com/tmaklin/bxzstr/pull/35 for an implementation.
Changing this to draft in favour of #35.