楼上已经给出了答案。
Title
[D] compress -- Compress data in memory
Syntax
compress [varlist]
Menu
Data > Data utilities > Optimize variable storage
Description
compress attempts to reduce the amount of memory used by your data.
Remarks
compress reduces the size of your dataset by considering demoting
doubles to longs, ints, or bytes
floats to ints or bytes
longs to ints or bytes
ints to bytes
strings to shorter strings
See [D] data types for an explanation of these storage types.
compress leaves your data logically unchanged but (probably) appreciably smaller. compress
never makes a mistake, results in loss of precision, or hacks off strings.