67. A computer program product (CPP) comprising a computer usable medium having computer readable program code (CRPC) means embodied in the medium for causing an application program to execute on a computer processor to perform quantization of a vector representative of a portion of a speech or audio signal, the CRPC means comprising: first CRPC means for causing the processor to determine an error term corresponding to a candidate codevector of a set of candidate codevectors, the error term being a function of the candidate codevector and the vector; second CRPC means for causing the processor to determine whether the candidate codevector is legal based upon one or more illegal space definitions, when the error term is better than a current best error term; third CRPC means for causing the processor to update the current best error term with the error term, when the error term is better than the current best error term and the codevector is legal, wherein the first, second and third CRPC means repeat their respective functions for all of the candidate codevectors, thereby establishing a best legal candidate codevector corresponding to the best current error term, whereby the best legal candidate codevector corresponds to a quantization of the vector; and fourth CRPC means for causing the processor to transmit to a decoder a signal representative of the speech or audio signal based on the best legal candidate codevector.
69. The CPP of claim 67 , wherein the second CRPC means comprises: fifth CRPC means for causing the processor to determine whether the candidate codevector belongs to an illegal space representing illegal vectors; and sixth CRPC means for causing the processor to declare the candidate codevector legal when the candidate codevector does not belong to the illegal space.