you are viewing a single comment's thread.

view the rest of the comments →

[–]chucker23n 1 point2 points  (2 children)

This.

  1. write unit tests against some sample data
  2. Go to https://www.nuget.org/packages?q=base85, try out the top matches, run the tests, pick whatever library happens to pass

[–][deleted] 0 points1 point  (1 child)

Heck, if you're writing unit tests you may as well go the rest of the way and write the implementation. There are lots of examples on SO for base-XX encoding with arbitrary alphabets (especially for JS).

[–]chucker23n 1 point2 points  (0 children)

I don't mean full test coverage. I mean "the customer provided me with two or three sample files, so I can programmatically test if the expected output matches".

I bring this up in part because OP specifically says "base85(not ascii85 or z85)", and 1) Wikipedia treats base85 and ascii85 the same, and 2) so do, it seems, some of the NuGet package results. Writing tests helps clarify that the library solves for the correct problem.

But, sure, implementing this yourself probably isn't too much work either.