Flexible low-density parity-check codes: rate, length, and complexity