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

Usage example #1

Open
LazarenkoA opened this issue Jun 18, 2023 · 0 comments
Open

Usage example #1

LazarenkoA opened this issue Jun 18, 2023 · 0 comments

Comments

@LazarenkoA
Copy link

LazarenkoA commented Jun 18, 2023

I tried to write the code, but something didn't work out.

func main() {
	conf, err := bch.CreateConfig(100, 10)
	if err != nil {
		fmt.Println(err)
		return
	}

	data := []uint8{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
        // encoded in application A

	d, err := bch.Encode(conf, &data)
	if err != nil {
		fmt.Println(err)
		return
	}
        // send d to application B

  // decoded in application B
	recd, errors, err := bch.Decode(conf, &d)
	fmt.Println(recd, errors, err)

}

It's completely unclear what length the key should be. I was thinking of using BCH codes for byte stream transmission tasks, where application A sends a bucket of data to application B, but data loss during transmission needs to be minimized.

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

No branches or pull requests

1 participant