A tailored bit inversion interleaver supports different packet sizes and variable code rates, and provides good expansion and puncture coding characteristics. In order to interleave data, an input data packet having a first size is first received. The packet is expanded to a second size, where the second size is a power of two, eg by adding padding or correctly generating the write address. The extended packets are interleaved according to the bit inversion interleaving scheme for the second size, so that the bits in the extended packets are reordered according to their indices. Interleaved data packets are formed by tailoring the output of the bit-inverted interleaver, eg, to remove padding or to generate read addresses correctly. The cropped bit-inversion interleaver can be used in combination with various types of FEC codes (eg, Turbo codes, convolutional codes, or low-density parity-check (LDPC) codes).