Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
encoding/gob: Encode gives "encoder: message too big" when given a large map #13850
OSX / go version go1.5.1 darwin/amd64
The repro case below creates a map that's a few GB big and then attempts to encode it to a file using Encode(). Encode() fails with a "message too big" error. (Presumably because the full size of the map is greater than 1<<30, which is the value of "tooBig" in the gob implementation.
I would expect the gob implementation to be able to handle a map that's larger than the maximum message size, since the individual elements being encoded are much smaller than the limit.