eh ci avevo pensato.. ma cavolo c'è un metodo:
s.Write(buffer, 0, buffer.Length);
che lo scrive tutto insieme