1. A method for detecting spectral null sequences of a spectrally-constrained code, comprising the steps of: using an encoder, generating the spectral null sequences from digital electrical signals representing unencoded input data; transmitting the sequences from the encoder to a partial response channel subject to noise; and transmitting the sequences from the channel to a Viterbi detector having a detector trellis structure derived from a running-digital-sum (RDS) trellis structure that is made time-varying by partitioning a set of quasicatastrophic sequences generated by a canonical spectral null trellis into disjoint subsets, each of which subsets is assigned to a unique initial RDS state.