Synchronization codes are frequently used in numerical data transmission and storage. Compression by Substring Enumeration (CSE) is a new lossless compression scheme that has turned into a new and unusual application for synchronization codes. CSE is an inherently bit-oriented technique. However, since the usual benchmark files are all byte-oriented, CSE incurred a penalty due to a problem called phase unawareness. Subsequent work showed that inserting a synchronization code inside the data before compressing it improves the compression performance. In this paper, we present two constraint models that compute the shortest synchronization codes, i.e. those that add the fewest synchronization bits to the original data. We find synchronization codes for blocks of up to 64 bits.