(offer SessionDescription)
| 16 | ) |
| 17 | |
| 18 | func Encode(offer SessionDescription) string { |
| 19 | var b bytes.Buffer |
| 20 | w := zlib.NewWriter(&b) |
| 21 | w.Write([]byte(offer.Sdp)) |
| 22 | w.Close() |
| 23 | offer.Sdp = base58.Encode(b.Bytes()) |
| 24 | offerBytes, _ := json.Marshal(offer) |
| 25 | return base58.Encode(offerBytes) |
| 26 | } |
| 27 | |
| 28 | func Decode(offer string) (sd SessionDescription, err error) { |
| 29 | decodeBytes := base58.Decode(offer) |
no outgoing calls