static boolean checkIsCompactMemory ( final Memory srcMem ) { // only reading so downcast is ok final int flags = extractFlags ( srcMem ) ; final int compactFlags = READ_ONLY_FLAG_MASK | COMPACT_FLAG_MASK ; return ( flags & compactFlags ) > 0 ; }
Checks just the flags field of an input Memory object . Returns true for a compact sketch false for an update sketch . Does not perform additional checks including sketch family .