A barcode reading apparatus and method in which the spectrum of a probe light is first Fourier-transformed into space, directed upon a barcode, and then Fourier-transformed converting the spectrally encoded barcode pattern to a time domain waveform. In one implementation, the Fourier transformation from the spectrum domain into a spatial domain is performed by a dispersive element, while the Fourier transformation from the spectrally encoded barcode pattern to a time domain waveform is performed by group-velocity dispersion (GVD). The temporally encoded barcode pattern is detected by a photodetector, digitized by a digitizer, and analyzed by a digital signal processor. The invention is applicable to a number of fields which involve the reading of one- and two-dimensional barcodes, displacement sensing, surface measurements, measurement of width and gap, flow cytometry, reading of optical media, presense or absence detection, and other related fields.