Merge pull request #54 from fkautz/pr_out_exposing_newencoder_since_getencoder_is_no_longer_around

Exposing NewEncoder since GetEncoder is no longer around
This commit is contained in:
Harshavardhana 2014-11-29 14:57:42 -08:00
commit 48898d770d
2 changed files with 3 additions and 3 deletions

View File

@ -112,6 +112,6 @@ func (e *Encoder) Decode(chunks [][]byte, length int) ([]byte, error) {
}
func Decode(block [][]byte, ep *EncoderParams, length int) ([]byte, error) {
encoder := newEncoder(ep)
encoder := NewEncoder(ep)
return encoder.Decode(block, length)
}

View File

@ -88,7 +88,7 @@ func ParseEncoderParams(k, m, technique int) (*EncoderParams, error) {
}, nil
}
func newEncoder(ep *EncoderParams) *Encoder {
func NewEncoder(ep *EncoderParams) *Encoder {
var k = C.int(ep.k)
var m = C.int(ep.m)
@ -152,6 +152,6 @@ func (e *Encoder) Encode(block []byte) ([][]byte, int) {
}
func Encode(block []byte, ep *EncoderParams) ([][]byte, int) {
encoder := newEncoder(ep)
encoder := NewEncoder(ep)
return encoder.Encode(block)
}