public static byte[] toBytes(long value, int size) throws IllegalArgumentException {
		if (size != 4 && size != 8) {
			throw new IllegalArgumentException("Size must be 4 or 8 (got " + size + ")");
		}
		DataConverter converter = LittleEndianDataConverter.INSTANCE;
		return size == 8 ? converter.getBytes(value) : converter.getBytes((int) value);
	}
Converts the given value to a byte array

@param value The value to convert to a byte array
@param size The number of bytes to convert (must be 4 or 8)
@return The value as a byte array of the given size
@throws IllegalArgumentException if size is an unsupported value
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ExtractedMacho.java