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

How about providing a dummy archiver? #347

Open
orca-zhang opened this issue Aug 31, 2022 · 1 comment
Open

How about providing a dummy archiver? #347

orca-zhang opened this issue Aug 31, 2022 · 1 comment

Comments

@orca-zhang
Copy link

orca-zhang commented Aug 31, 2022

Dear Matt,

Thanks to your great lib.
What I'm working is optional compressed extensions, so non-compressed ones that they do nothing about compression/decompression are included.

What would you like to have changed?

provide a dummy implementation

Why is this feature a useful, necessary, and/or important addition to this project?

easy to deal with non-compressed options

What alternatives are there, or what are you doing in the meantime to work around the lack of this feature?

DIY or writing some special hard codes

Please link to any relevant issues, pull requests, or other discussions.

maybe it will look like bellows (in v3)

type DummyArchiver struct{}

func (DummyArchiver) CheckExt(string) error { return nil }
func (DummyArchiver) Compress(in io.Reader, out io.Writer) error {
	_, err := io.Copy(out, in)
	return err
}
func (DummyArchiver) Decompress(in io.Reader, out io.Writer) error {
	_, err := io.Copy(out, in)
	return err
}
@orca-zhang orca-zhang changed the title How about provide a dummy archiver? How about providing a dummy archiver? Aug 31, 2022
@mholt
Copy link
Owner

mholt commented Aug 31, 2022

To clarify, are you asking about v3 or v4? Because I'm no longer developing for v3...

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

No branches or pull requests

2 participants