getSignedChunkLength - calculates the length of chunk metadata
(chunkDataSize int64)
| 56 | |
| 57 | // getSignedChunkLength - calculates the length of chunk metadata |
| 58 | func getSignedChunkLength(chunkDataSize int64) int64 { |
| 59 | return int64(len(fmt.Sprintf("%x", chunkDataSize))) + |
| 60 | chunkSigConstLen + |
| 61 | signatureStrLen + |
| 62 | crlfLen + |
| 63 | chunkDataSize + |
| 64 | crlfLen |
| 65 | } |
| 66 | |
| 67 | // getStreamLength - calculates the length of the overall stream (data + metadata) |
| 68 | func getStreamLength(dataLen, chunkSize int64, trailers http.Header) int64 { |