Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

LZ4.encode cant not decode the data it produced #87

Open
phardye opened this issue Jul 8, 2019 · 0 comments
Open

LZ4.encode cant not decode the data it produced #87

phardye opened this issue Jul 8, 2019 · 0 comments

Comments

@phardye
Copy link

phardye commented Jul 8, 2019

Hi everyone,
I want to use lz4 with browser.And I have a test with the following html code.Bust here is an error occurred. The console says "Uncaught Error: Invalid magic number: 184D7064 @0". The magic number should be 0x184D2204 .But why it changed?
Here is the code:

<html>

<head>
	<title>LZ4 compress</title>
</head>

<body>
	<script type="text/javascript" src="../build/lz4.js"></script>
	<script type="text/javascript">
		var LZ4 = require('lz4');
		var data = "TEST";
		var compressed_data = LZ4.encode(data);
		var uncompress_data = LZ4.decode(compressed_data);		
	</script>
</body>

</html>

Thanks very much.
Hardy

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

No branches or pull requests

1 participant