Pack.java: make pack() return byte count