A tree-structured residual vector quantisation (VQ) algorithm with constrained storage based on a codebook sharing algorithm is proposed. The algorithm provides an intermediate property of multistage VQ and tree-structured VQ, and thereby can trade off coding performance for storage requirement. The algorithm is especially suited to image coding where a large vector dimension is preferred due to its coding efficiency.