|
|
@ -5,17 +5,22 @@ import "errors" |
|
|
|
type DataHeader struct { |
|
|
|
type DataHeader struct { |
|
|
|
Key string |
|
|
|
Key string |
|
|
|
Part int |
|
|
|
Part int |
|
|
|
ContentType string |
|
|
|
Metadata map[string]string |
|
|
|
Length uint64 |
|
|
|
|
|
|
|
Md5sum []byte |
|
|
|
|
|
|
|
EncoderParams EncoderParams |
|
|
|
EncoderParams EncoderParams |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type EncoderTechnique int |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
|
|
|
|
VANDERMONDE EncoderTechnique = iota |
|
|
|
|
|
|
|
CAUCHY |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
type EncoderParams struct { |
|
|
|
type EncoderParams struct { |
|
|
|
Length int |
|
|
|
Length int |
|
|
|
K int |
|
|
|
K int |
|
|
|
M int |
|
|
|
M int |
|
|
|
Technique int |
|
|
|
Technique EncoderTechnique |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func Write() error { |
|
|
|
func Write() error { |
|
|
|