mirror of
https://github.com/minio/minio.git
synced 2025-01-24 13:13:16 -05:00
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:
commit
48898d770d
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user