[SPARK-2897][SPARK-2920]TorrentBroadcast does use the serializer class specified in the spark option "spark.serializer"

you can fit this on one line
```
val out: OutputStream = if (compress) compressionCodec.compressedOutputStream(bos) else bos
```