// CommitPending is a helper function that commits the current written bits
// only if the byte chunk is partially written. Does nothing if the byte chunk
// is empty.
//
// If it is unknown if the number of bits written will completely fill all
// chunks, then it is recommended to execute this once to conclude writing.
CommitPending is a helper function that commits the current written bits
only if the byte chunk is partially written. Does nothing if the byte chunk
is empty.

If it is unknown if the number of bits written will completely fill all
chunks, then it is recommended to execute this once to conclude writing.
// CommitPending is a helper function that commits the current written bits // only if the byte chunk is partially written . Does nothing if the byte chunk // is empty . // // If it is unknown if the number of bits written will completely fill all // chunks then it is recommended to execute this once to conclude writing .
func (w *Writer) CommitPending() (written int, err error) {
	if w.HasPendingBits() {
		return w.Commit()
	}
	return
}
func ( w * Writer ) CommitPending ( ) ( written int , err error ) { if w . HasPendingBits ( ) { return w . Commit ( ) } return }
CommitPending is a helper function that commits the current written bits
only if the byte chunk is partially written.
CommitPending is a helper function that commits the current written bits only if the byte chunk is partially written .