A data-demodulating apparatus for demodulating a variable-length code (d, k;
m,
n; r) having a basic code length of n bits to data having a basic data length of
m bits. A train of codes is received, and a sync signal having a pattern that breaks
a maximum run is detected. The pattern is repeated twice continuously and the minimum
run is repeated no more than six times. The first bit of the sync signal is "1"
when the train of modulated codes that immediately precedes the sync signal is
included in a termination table used to terminate, at a desired position, a code
when less than a predetermined number of variable length codes are available.