The C-based netCDF library itself does not do packing and unpacking, but the Java-netCDF library will do automatic unpacking, see documenation for the class VariableDS.
For details, see the Packed Data Values section of the netCDF Best Practices document. There are some subtleties involving avoiding introducing bias when packing, and how to represent missing values.