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

Hello @jaredwray , if you don't set any value before getting value, an error occurs when using compression : #1117

Closed
jaredwray opened this issue Sep 5, 2024 · 2 comments
Assignees
Labels

Comments

@jaredwray
Copy link
Owner

          Hello @jaredwray , if you don't set any value before getting value, an error occurs when using compression :
test.it('decompress should not throw error when empty with gzip', async t => {
	const keyv = new Keyv({store: new Map(), compression: new KeyvGzip()});
	await t.expect(keyv.get('foo')).resolves.not.toThrowError();
});

test.it('should not throw error when empty', async t => {
	const keyv = new Keyv({store: new Map()});
	await t.expect(keyv.get('foo')).resolves.not.toThrowError();
});

The first one failed

image

Originally posted by @djedje72 in #1107 (comment)

@jaredwray jaredwray self-assigned this Sep 5, 2024
@jaredwray jaredwray added the bug label Sep 5, 2024
@jaredwray
Copy link
Owner Author

@djedje72 - adding it as a bug here

jaredwray added a commit that referenced this issue Sep 5, 2024
* compress-gzip - fix: set any value before getting value

#1117

* updating brotli

* updating to inflate and deflate
@jaredwray
Copy link
Owner Author

This should be fixed now in @keyv/compress-gzip and @keyv/compress-brotli

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

No branches or pull requests

1 participant