This paper describes a new approach to the coding of transform coefficients used in transform-based image compression schemes such as JPEG. Experimental results demonstrate the advantages of this scheme in terms of a significant entropy reduction leading to improved compression.The scheme employs an adaptive zigzag-reordering technique, which operates on rectangular sub-blocks of coefficients. Initially, the sub-block dimensions are determined so as to retain all non-zero coefficients. A subsequent development employs a neural network to selectively discard isolated non-zero coefficients, producing smaller sub-blocks and further improvements in coding efficiency. A hardware implementation of the reordering algorithm is also discussed.