Integer encoder implementations for testing.