code: public static void writeCompressedStringArray(DataOutput out, String[] s) throws IOException {
          if (s == null) {
              out.writeInt(-1);
              return;
          }
          out.writeInt(s.length);
          for (int i = 0; i < s.length; i++) {
              writeCompressedString(out, s[i]);
          }
      }
docs: /*
  Write a String array as a Nework Int N, followed by Int N Byte Array of
  compressed Strings. Handles also null arrays and null values.
  Could be generalised using introspection.